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 //利用系统…