Re: [ima-sdk] Digest for ima-sdk@googlegroups.com - 1 update in 1 topic

32 views
Skip to first unread message

Rita

unread,
Jul 30, 2025, 9:26:00 AM7/30/25
to ima...@googlegroups.com, Angela Ramirez

On Wed, Jul 30, 2025, 7:48 AM <ima...@googlegroups.com> wrote:
(威里)RD_WillyChen <willy...@tgc-taiwan.com.tw>: Jul 30 01:52AM -0700

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.
- This behavior appears to cause memory leaks and potential resource
buildup, especially during repeated ad sessions.

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:
 
[image: 1.png]
 
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;
- Or if this is a known issue with the SDK that is planned to be
addressed.
 
*Environment Details:*
Platform: iOS
IDE: Xcode 16.2
SDK: GoogleAds-IMA-iOS-SDK version *3.26.1*
 
Thanks in advance for your support.
 
Best regards,
 
Willy Chen
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to ima-sdk+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages