How do I prevent AIR privateMemory from ballooning and crashing my app?
I have a memory leak problem that keeps crashing my application; the application is programmed to display ten locally-stored swfs with embedded videos in rotation. Eventually, I get this error:
adl(2986,0xacee52c0) malloc: *** mmap(size=3584000) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
A trace of freeMemory usually returns between 0 and 1 MB.
A trace of totalMemory usually returns between 30 and 102 MB.
A trace of privateMemory starts around 300 MB and crashes once it hits 1.8 GB (at least on my mac)
The swfs are loaded into the app and never unloaded - we found that running unloadAndStop() would reduce the totalMemory but cause the privateMemory to escalate extremely quickly.
Yes - we have been doing all of our best practices for memory management, event listeners are all removed, unused data and objects are nulled out.
Is there a way to get the AIR app to return privateMemory allocated to it back to the OS? The garbage collector won't do it.
Using AIR 2.7 (for use on a linux box)
