onDestroy called but animation thread is not disposed of
in
Android Processing
•
8 months ago
Hello, I have implemented an Android app using the Processing API and I have an issue where the animation thread is not being disposed of during a call to onDestroy(), which is causing memory leaks. If I use a debugger I can see that there are multiple animation threads running concurrently. This happens whenever I run the app and then go into the "recents" menu, and then selecting the app from the recents list causes a second animation thread to be run without destroying the first. If I do this a couple of times I end up with an OutOfMemory Exception caused by the accumulated memory from all the animation threads running.
I am experiencing this problem on a Nexus 7 with Android 4.2. However, I've also tried doing this on a Galaxy Nexus - Android 4.1 - and I can't reproduce this issue on that device because going into the recents menu from the app, the app doesn't show up in the list. I can only select other apps and then go back into my app, but this series of events doesn't seem to make a call to onDestroy() unlike in the Nexus 7.
Anybody else have this issue? Suggestions? Advice?
1