question

Micah Koffron avatar image
Micah Koffron asked

MraidDisplayController leaks reference to the Activity

I'm seeing that if I rotate my app repeatedly, run a GC, and capture the memory profile, I have numerous instances of my main Activity still in memory. Tracing the references down leads to finally finding BroadcaseReceiver registrations (form Context.registerReceiver()) with my Activity (Context) as keys in a hash table and an instance of [b]com.amazon.device.ads.MraidDisplayController$1[/b] as the value. Looking in the MraidDisplayController class, I can see it has an initialize method that eventually calls Context.registerReceiver() and it also has a protected method that cleans this up... however there are no callers to this method (or derived classes)... so it never gets called and we have a leak. Is this a known issue? Problem with my coding?
mobile ads
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Micah, I am checking with team here and will get back to you shortly. Thanks.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Micah, Could you please check that if you are calling AdLayout.destroy when they are done with the ad and confirm me? Thanks.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.