Re:LeakCanary: Detect all Android memory leaks
by MichaelCrawford on Friday May 08, 2015 @07:39PM
(#9514765)
A "garbage collection leak" is a leak if you have a reference to an object that you don't really need anymore.
Consider a Document Object Model tree with 20 MB of memory. Each child holds a reference to its parent. If there are no references from outside the tree to anywhere inside it, it will eventually be collected. But one single reference to a DOM node from anywhere outside the DOM, and you've leaked twenty meg.
Consider a Document Object Model tree with 20 MB of memory. Each child holds a reference to its parent. If there are no references from outside the tree to anywhere inside it, it will eventually be collected. But one single reference to a DOM node from anywhere outside the DOM, and you've leaked twenty meg.