Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chapter04 Hprof 内存分析作业 #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dongzhixuanyuan
Copy link

极客时间ID:LD
// 1、构造内存泄漏(重复加载同一张图片)并设置到不同的imageview
// 2、Haha库使用,生成内存快照。
// 3、获取bitmap相关的对象的内存快照。
// 4、构建map key:bitmap内存映射对象,value:bitmap Class 的mbuffer字段值
// 5、构建map key:步骤4中的mbuffer字段的数组的hashcode,value:拥有相同hashcode的Instance 集合。
// 6、过滤步骤5中map,如果value(list)的size大于1,就表示有多个instance的mbuffer是一样的,就可以被认为是内存泄漏了。
// 7、获取bitmap的宽高和buffer长度
// 8、获取bitmap的引用链。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant