chapter04 Hprof 内存分析作业#7
Open
dongzhixuanyuan wants to merge 2 commits intoAndroidAdvanceWithGeektime:masterfrom
Open
chapter04 Hprof 内存分析作业#7dongzhixuanyuan wants to merge 2 commits intoAndroidAdvanceWithGeektime:masterfrom
dongzhixuanyuan wants to merge 2 commits intoAndroidAdvanceWithGeektime:masterfrom
Conversation
added 2 commits
December 27, 2018 12:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
极客时间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的引用链。