Dear support teams,
We’ve encountered a potential memory leak issue when using IMACompanionAdSlot on iOS. Specifically, we noticed that the WKWebView used internally by the companion ad slot is not deallocated after calling IMAAdManager.destroy().
Here’s what we observed:
We're using IMACompanionAdSlot to display companion ads, and we confirmed that it internally relies on WKWebView.
After calling adsManager?.destroy(), the companion ad views are removed from the screen, but the underlying WKWebView instances remain in memory.
As a temporary solution, we are storing references to the companion ad slots that have been successfully filled, and before calling adsManager?.destroy(), we iterate through those slots to manually remove the message handlers like so:
While this helps mitigate the issue, we would appreciate any official guidance or best practices on properly cleaning up companion ad slots to prevent memory retention issues.
Please let us know:
If this is expected behavior;
If there’s an official method to release or clean up the internal WKWebView used in companion ads;
Environment Details:
Thanks in advance for your support.
Best regards,
Willy Chen
Hi,
Thank you for reaching out to the IMA SDK Support team.
Based on my investigation, I can confirm that after calling adsManager.destroy(), WKWebView instances are not being properly released, and memory usage continues to increase . I will raise this request to the wider team for further review and will update you as soon as I have any new information.Meanwhile, your patience is important.
![]() |
IMA SDK Team |
[2025-08-01 13:10:00Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01sxDYw:ref" (ADR-00321194)
![]() |
IMA SDK Team |
[2025-10-06 20:30:54Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01sxDYw:ref" (ADR-00321194)