Skip to content

Conversation

pyricau
Copy link
Member

@pyricau pyricau commented Jan 10, 2019

In Perflib, Snapshot.getGcRoots() only returns the GC roots from the first heap. Based on empirical evidence, it seems like Android has 4 heaps, and the GC Roots used to only be in the first heap, but more recent versions of Android have GC Roots in other heaps as well.

This means LeakCanary would sometimes show "No Leak Found" when there actually was a leak.

Fixes #1163

In Perflib, Snapshot.getGcRoots() only returns the GC roots from the first heap. Based on empirical evidence, it seems like Android has 4 heaps, and the GC Roots used to only be in the first heap, but more recent versions of Android have GC Roots in other heaps as well.

This means LeakCanary would sometimes show "No Leak Found" when there actually was a leak.

Fixes #1163
@pyricau pyricau merged commit 64b6e5a into master Jan 10, 2019
@pyricau pyricau deleted the py/fix_no_leak_found branch January 10, 2019 23:32
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