You are here:

[For Developers] LeakCanary By Square Is Really A Low-Effort Library For Easily Tracking Lower Memory Leaks In Android Apps

[For Developers] LeakCanary By Square Is Really A Low-Effort Library For Easily Tracking Lower Memory Leaks In Android Apps

  • Development
  • News

Writing great, high-quality software packages are effort. It doesn’t matter how we all know a platform or how extended we purchase code, there will probably be bugs. Memory leaks are signs problems, and they might be particularly disruptive on mobile phones. Square tried to make memory leaks better to find and fasten having a completely new library referred to as LeakCanary. It will make leak recognition almost automatic and presents results in both logcat and a straightforward-to-read interface.

screenshot

LeakCanary is built to be as easy to use as you can. For a lot of applications, it must just have a few additional lines inside the app’s build.gradle file, then one more kind of code within your Application class. This will enable tracking for memory leaks in activities. For further comprehensive coverage, the RefWatcher object might be given to observe objects that should be garbage collected.

When a product isn’t released properly, LeakCanary publishes a leak trace to logcat and fosters a notification inside the status bar. Tapping round the notification reveals a screen getting an easy demonstration of the leak trace that shows which class object remains holding a reference. If memory leaks are identified that cannot be fixed, including known issues inside the Android SDK itself, LeakCanary might be configured to disregard these without producing any notifications.

Solutions are temporarily locked in your app’s private storage, but they might be exported using a share intent, or they might be posted with a server with a few extra code.

LeakCanary joins Square’s substantial report on free projects. It’s completely free as well as the member list was already exploding in proportions. For a short while of backstory about how precisely the job began, check out Square’s blog publish, or dive towards the setup instructions to acquire started from it inside your projects.

 

Posted by: Raymond

Related articles
 

2 Comments
 

  • gk1984

    November 14, 2016 - 7:38 am Reply

    Hi, this is a comment.
    To delete a comment, just log in and view the post's comments. There you will have the option to edit or delete them.

  • Gisle EnÃ¥sen

    November 17, 2016 - 7:38 am Reply

    Hi, this is a comment.
    To delete a comment, just log in and view the post's comments. There you will have the option to edit or delete them.

Leave a Reply
 

Your email address will not be published. Required fields are marked (*)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

November 2016
M T W T F S S
« Oct    
 123456
78910111213
14151617181920
21222324252627
282930  

Back to Top