Repolode
square

square/leakcanary

A memory leak detection library for Android that automatically reports leaked objects during debug builds.

Stars
30,006
Forks
3,989
Open issues
130
Last commit
17 days ago

What is it?

LeakCanary is a memory leak detection library for Android apps. It helps developers find objects that should have been garbage collected but are still held in memory, which can otherwise lead to slowdowns and OutOfMemoryError crashes.

The project is distributed as a library that developers add to their Android app, and it is aimed at debugging rather than production use. Its documentation is hosted on the project's GitHub Pages site, where setup instructions and details are available.

The library is written in Kotlin and is licensed under Apache-2.0.

Key features

  • 01Detects leaked Android objects such as Activities and Fragments during development.
  • 02Shows a notification with leak details when a leak is found.
  • 03Written in Kotlin for Android projects.

Use cases

  • Debugging memory leaks in an Android app during development.
  • Investigating OutOfMemoryError crashes caused by retained objects.
  • Checking that Activities are released properly after navigation.

Quick start

  1. 1

    Visit the project documentation site for setup instructions

Things to know

  • Android-only library; not usable for other platforms.
  • The README gives no installation commands, so setup details must be read on the documentation site.

In collections

Topics

#android#kotlin#memory-leak#debugging#mobile-development#java#kotlin-android#leak-canary#leak-trace#leakcanary

FAQ

What is leakcanary?
A memory leak detection library for Android that automatically reports leaked objects during debug builds. LeakCanary is a memory leak detection library for Android apps. It helps developers find objects that should have been garbage collected but are still held in memory, which can otherwise lead to slowdowns and OutOfMemoryError crashes.
Is leakcanary free to use? What license does it have?
leakcanary is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is leakcanary still maintained?
Actively maintained. The last commit to leakcanary was on Oct 21, 2026.
What can I use leakcanary for?
Debugging memory leaks in an Android app during development. Investigating OutOfMemoryError crashes caused by retained objects. Checking that Activities are released properly after navigation.
How do I install leakcanary?
Visit the project documentation site for setup instructions
Where can I get leakcanary?
The source code and installation instructions are on GitHub: https://github.com/square/leakcanary

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects