You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A fix in #213 solved the issue of Activity refs being retained by PApplet fragments. That solves a major part of memory loss/leakage. Those activity's PApplet fragments, however, are themselves retained in memory even after the Activity instances are gone from the Heap.
Here is a sample reference tree of such a fragment ref still on the heap:
All fragments should be automatically disposed when the activity that created them is destroyed, and this won't happen if the app was only paused or stopped. I made some minor changes (668bb06) to make sure that not references to the main activity are left inside the renderer, this might help.
Also, this thread mentions the use of Activity.finish() and Activity.finishAffinity(), which sounds like the right way to terminate the app and all associated components. I'm going to use finishAffinity() in exit2(), and see what happens.
I replaced the System.exit() call with activity.finish() in 8eaccf1, and didn't see any memory issues so far. Closing this issue, feel free to reopen it if you still find memory leakage.
A fix in #213 solved the issue of Activity refs being retained by PApplet fragments. That solves a major part of memory loss/leakage. Those activity's PApplet fragments, however, are themselves retained in memory even after the Activity instances are gone from the Heap.
Here is a sample reference tree of such a fragment ref still on the heap:
mypkg.MyTroublesomeProcessingFragment extends PApplet.
It looks like the PImage is still in memory and through the object tree the reference is retained.
The text was updated successfully, but these errors were encountered: