Closed frankowskid closed 11 years ago
Thanks for the post. Orientation change has a bunch of problems #21, which also extends to anything that needs to deref or cleanup (onPause, onDestroy) - I'm trying to get an update committed this week to start getting and handle on this. I'll keep your patch handy.
another huge leak is made by inner class of RenderTask
Thanks for the feedback. I'm moving all the anonymous nested inner class Handlers away from that setup. I know lint is reporting that warning. I should have that done fairly soon.
I've made an update with respect to the lint reports of potential leaks.
TileManager will leak on orientation change. The reason for memory leak is inner class of Handler instance. This should be static.
Example solution would be.
static private Handler handler = new Handler() { @Override public void handleMessage(final Message message) { switch ( message.what ) { case RENDER_FLAG : TileManager manager = (TileManager)message.obj; manager.renderTiles(); break; }}};