Skip to content
🤔 Documentation issue? Report it

//leakcanary/leakcanary/LeakCanary/config

config

@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);