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