finds.dev← search

// the find

square/leakcanary

★ 29,920 · Kotlin · Apache-2.0 · updated Mar 2026

A memory leak detection library for Android.

LeakCanary is the standard memory leak detection tool for Android — add one dependency and it automatically detects leaked Activities, Fragments, ViewModels, and Views at runtime, then shows you the full reference chain causing the leak. It's for any Android developer who has stared at an OOM in production and guessed wrong about the cause.

Automatic instrumentation via ContentProvider means zero setup code — `debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.x'` is literally all you need. The leak trace UI groups leak signatures so five different crashes with the same root cause show as one entry, not noise. Shark (the heap analyzer) runs in a separate process, so the dump-and-analyze step doesn't kill your app under test. The `leakcanary-android-instrumentation` module integrates into instrumented test suites and fails tests on leaks, which is the right place to catch these.

Activity-based UI is stuck in pre-Compose Android — the leak viewer uses a hand-rolled backstack with View-based screens when Compose has been the standard for years. CI upload support is documented but not built-in; you have to wire up your own uploader to get leaks surfaced outside the device. The workflows-disabled directory is a red flag — GitHub Actions CI is disabled, suggesting the project isn't regularly running its own automated tests. Last meaningful activity is March 2026 but the pace has slowed considerably from the v2.0 era.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →