Java 线程有 6 种状态. 在某个给定时间点上, 一个线程只能处于这 6 种状态中的一种.
线程状态的枚举: Thread.State
这 6 种状态被明确地定义在 Thread 类的一个内部枚举类 Thread.State 中: 它们是:
NEW (新建) A thread that has not yet started is in this state.RUNNAB…
LeakCanary github地址:LeakCanary
要使用 LeakCanary,请将leakcanary-android依赖项添加到应用程序的build.gradle文件中: dependencies {// debugImplementation because LeakCanary should only run in debug builds.debugImplementation com.square…
然后我们可以看到LeakSentryInstaller这个类到底做了什么
internal class LeakSentryInstaller : ContentProvider() {
override fun onCreate(): Boolean { CanaryLog.logger DefaultCanaryLog() val application context!!.applicationContext as Application //利用系统…