开发者

What types of leaks get reported in logcat and what other ways or tools do we have for finding leaks?

I'm beginning Android development and I am concerned about leaks.

I think thread leaks can get reported in logcat if memory serves. But what other types of leaks get reported by logcat? I have gotten feedback about potential leaks that concerns me and I take it very seriously.

What other 开发者_C百科ways do I have for detecting leaks? For example can I instrument my code so that an otherwise unnoticeable leak will show up in logcat?

Thanks for any reply. Happy coding.


Great talk at IO this year on the subject http://www.google.com/events/io/2011/sessions/memory-management-for-android-apps.html


There's the Allocation Tracker tool in DDMS, that goes down to a very detailed level. Here's some info from Romain Guy (one of the folks on the Android dev team at Google):

http://www.curious-creature.org/2009/02/07/track-memory-allocations-on-android/

Extremely valuable tool.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜