Skip to content
🤔 Documentation issue? Report it

//leakcanary-repo/leakcanary/LeakCanary/config

config

[androidJvm]\

@JvmStatic

@Volatile

var config: LeakCanary.Config

The current LeakCanary configuration. Can be updated at any time, usually by replacing it with a mutated copy, e.g.:

LeakCanary.config = LeakCanary.config.copy(retainedVisibleThreshold = 3)

In Java, use LeakCanary.Config.Builder instead:

LeakCanary.Config config = LeakCanary.getConfig().newBuilder()
   .retainedVisibleThreshold(3)
   .build();
LeakCanary.setConfig(config);