These class define how LeakCanary traverses the graph, and allow for the creating of virtual references, as introduced here.
New APIs, not stable yet: ReferenceReader implementations aka expanders, are now public APIs. */ val HeapGrowthDetector by lazy Įnsure your UI tests have enough heap by updating src/androidTest/AndroidManifest.xml: * * Call with a scenario to repeat, * then assert that the resulting is empty.
Import leakcanary.AndroidDebugHeapDumper import shark.AndroidReferenceMatchers import shark.AndroidReferenceReaderFactory import shark.CloseableHeapGraph import shark.DiffingHeapGrowthDetector import shark.HeapGraphProvider import shark.HeapTraversal import import shark.IgnoredReferenceMatcher import shark.LiveHeapGrowthDetector import shark.LoopingHeapGrowthDetector import shark.MatchingGcRootProvider import import java.io.File import import import /** * Heap growth detector for in process Espresso UI tests.
LeakCanary will now crash in release builds Plumber-android is a new artifact that fixes known Android leaks 🚽🔧Īnalyzing leaks from the CLI is easier than ever 🍺 Improved support for data structure internalsĭetecting root views retained after View.onDetachedFromWindow()ĭetecting services retained after Service.onDestroy()Ĭompute retained size within the leak trace Breaking change: FailTestOnLeakRunListener deleted