memory, that are not needed anymore according to the application logic, but still retain memory and cannot be collected because they are referenced from other live objects, due to a bug in application itself”
Later, in a background thread, it checks if the reference has been cleared and if not it triggers a GC. If the reference is still not cleared, it then dumps the heap into a .hprof file stored on the app file system. HeapAnalyzerService is started in a separate process and HeapAnalyzer parses the heap dump using HAHA. HeapAnalyzer finds the KeyedWeakReference in the heap dump thanks to a unique reference key and locates the leaking reference. HeapAnalyzer computes the shortest strong reference path to the GC Roots to determine if there is a leak, and then builds the chain of references causing the leak. The result is passed back to DisplayLeakService in the app process, and the leak notification is shown. How does this works
like crashlytics… Run with instrument test, CI compliant Ignore specific reference to avoid system ML Not watching specific activity classes Other nice feature