Android/Java内存泄露检测框架 LeakCanary

码农软件 · 软件分类 · 程序调试工具 · 2019-11-30 14:12:09

软件介绍

LeakCanary 是 Android 和 Java 内存泄露检测框架。

开始使用

在 build.gradle 中加入引用,不同的编译使用不同的引用:

dependencies {
   debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3'
   releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3'
 }

在 Application 中:

public class ExampleApplication extends Application {
@Override 
    public void onCreate() {
        super.onCreate(); 
        LeakCanary.install(this); 
    } 
}

这样,就万事俱备了! 在 debug build 中,如果检测到某个 activity 有内存泄露,LeakCanary 就是自动地显示一个通知。

中文文档:http://www.liaohuqiu.net/cn/posts/leak-canary-read-me/

Demo:https://github.com/liaohuqiu/leakcanary-demo

Why:http://www.liaohuqiu.net/cn/posts/leak-canary/

本文地址:https://www.codercto.com/soft/d/20125.html

Head First jQuery

Head First jQuery

Ryan Benedetti , Ronan Cranley / O'Reilly Media / 2011-9 / USD 39.99

Want to add more interactivity and polish to your websites? Discover how jQuery can help you build complex scripting functionality in just a few lines of code. With Head First jQuery, you'll quickly g......一起来看看 《Head First jQuery》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

SHA 加密
SHA 加密

SHA 加密工具

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试