4 ms·
Detect Memory Leaks with LeakCanary
- chambo622 11y agoI heard Pierre give a talk about LeakCanary at Square this summer. It's an impressive tool and I'm already seeing it become a standard recommendation from Google engineers and DevRel people. Props to Square for another awesome open-source offering.
- parth16 11y agoWe adopted LeakCanary the day it was released but we don't find it useful at all. In fact, it makes the app almost unusable for us. Every 2-3 mins, it would just freeze the app to capture a heap dump. As our app is quite complicated with a big memory footprint, this just aggravates the problem. I just hope it was more usable.
- herbig 11y agoI've found LeakCanary incredibly useful at rooting out context related leaks you probably wouldn't otherwise think of. If you look under "no-op dependency" you'll find a solution to the issue you're describing. I've found it useful to have a leak canary specific build flavor or type, which only I ever see. For all other debug / production build leak canary is not initialized.
- Mickydtron 11y ago"That's terrible, and no one should do that." I find that I really enjoy talks that go through some of the antipatterns before showing the way they are showing off. It both helps build a pattern match of when I should be thinking about their solution, as well as being entertaining.