Leaking memory with ActionBarSherlock

让人想犯罪 __ 提交于 2020-01-14 22:32:32

问题


After each rotation of phone, whole Activity, with the ViewPager, all Fragments, ListViews etc are not GCed. I can tell because of OutOfMemoryError after 30-something roations and from MAT, which tells me I have 30-something instances of ListViews.

After getting rid of nearly everything in my app and leaving ActionBarSherlock, it turns out, that it's the one responsible for leak.

I'm debugging on 2.3.7 Desire.

Is there a problem with ABS library?


回答1:


No there isn't!

Hope someone can explain it to me, but apparently, when you run your app from your device menu, not from debug perspective, the leak disappears.

For more details, check out this closed issue: https://github.com/JakeWharton/ActionBarSherlock/issues/413

And thanks Jake for a great library!:)



来源:https://stackoverflow.com/questions/10305037/leaking-memory-with-actionbarsherlock

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!