Vector animations memory leak - Air for Android
I'll try and keep it quick...
I am developing an app for Android using Flash and have a few vector animation states for the main character. For now I have to keep these animations as vector because I need individual control over parts of the animation.
If I stick on the idle animation I see the memory usage go up around 0.1MB per second and that keeps ticking away consistently. (This is on the PC test for now).
If I change to the flying animation for a second and then back to the idle the memory starts going up 0.4MB per second.
Even though I've changed back to the original animation memory keeps rising by the larger rate. For each extra animation I switch to the rate of increase gets larger.
Testing on my HTC Desire HD the rate appear massively greater than the PC. On idle it raises 0.2MB per second and with switching it to flying then back gets up to 3MB per second.
For some background info, each animation state is a movieclip placed along the one timeline, one keyframe per state. This means I'm using an ordinary gotoAndStop commands to switch animation states. These animations have no code past a stop() command.
I've narrowed the leak to these animations because if I turn off the animation switching there's no increase (past the idle rate).
While the rate is manageable on PC it causes massive performance issues on the phone and I'm attempting to solve this without forcing garbage collection.
Any thoughts?
