In just a few few weeks, we reduced by 94% the OutOfMemoryError crashes in the Square Register Android app. We built http://squ.re/leakcanary to automatically detect memory leaks and make it very easy to fix them. This talk will cover the principles as well as the underlying implementation details. We'll dig into a few interesting examples and lessons learned.