Skip to main content
Participant
June 11, 2013
Question

AIR runtime Memory Leak?

  • June 11, 2013
  • 1 reply
  • 2904 views

Hi,

I have an app developed with AIR 3.7 for iOS (iPad)

The app gets very sluggish after a while, eventually crashes.

I've been -very- careful to pool objects where possible and cleanup / nullify all objects once they're not needed any more.

Profiling the app in Scout returns a pretty stable memory profile (the peaks and the lows translate very well to what's happening on screen)

Simultenously profiling the app using XCode's Instruments, shows me that the memory consumption off the app constantly rises up to the point the systems spends more time throwing memory warning than anything else.

Here are screenshots of both profilers: they show as3 memory usage being pretty stable, on the app level, memory keeps rising...

https://dl.dropboxusercontent.com/u/608333/AIR_memory_leak.zip

If AS3 is not leaking any memory (according to scout), but the app is (according to Instruments), would I be right assuming there's a memory leak in the AIR-runtime itself?

thanks for your feedback!

bart.

This topic has been closed for replies.

1 reply

Adobe Employee
June 11, 2013

Could you please share a sample application to reproduce the issue if possible. This will help us investigating the issue.

Thanks for reporting,

Nimit

Participant
June 18, 2013

Hey Nimitja,

If you want to, I can send you the full app source (several dozens of classes + assets, weighing in at about 500MB) It's client work, so I can't share the whole app publicly. Do you have an email address I can send you a link to?

I've been trying to narrow down the problem and my best hunch now is the following:

When you load content (an image) with a Loader class, defining a LoaderContext of ImageDecodingPolicy.ON_LOAD, then you cancel the loading (loader.unload(), remove all listeners, loader=null) right after the Event.OPEN but before Event.INIT / Event.COMPLETE events, memory isn't fully released.

Do this in a loop, with a few hundred images and you should see a discrepancy between memory usage in Scout and in Instruments.

Maybe that's something you wanne look into.

thanks,

bart

Adobe Employee
June 20, 2013

Yes, please send your narrow down reproducible case at nimitja@adobedotcom.

Regards,

Nimit