leakcanary
leakcanary copied to clipboard
Add imports to examples in docs
class DebugExampleApplication : ExampleApplication() {
override fun onCreate() {
super.onCreate()
val analysisUploadListener = EventListener { event ->
if (event is HeapAnalysisSucceeded) {
val heapAnalysis = event.heapAnalysis
TODO("Upload heap analysis to server")
}
}
LeakCanary.config = LeakCanary.config.run {
copy(eventListeners = eventListeners + analysisUploadListener)
}
}
}
where to import the LeakCanary?
import leakcanary.LeakCanary
Yes' I tried to import it from there and I got an error that 'config' has private access in the leak canary.LeakCanary'. And for the config any other changes needed?
I don't know.