public final class LeakCanary
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static RefWatcher |
androidWatcher(android.app.Application app,
HeapDump.Listener heapDumpListener)
Creates a
RefWatcher with a default configuration suitable for Android. |
static void |
enableDisplayLeakActivity(android.content.Context context) |
static RefWatcher |
install(android.app.Application application)
Creates a
RefWatcher that works out of the box, and starts watching activity
references (on ICS+). |
static RefWatcher |
install(android.app.Application application,
java.lang.Class<? extends AbstractAnalysisResultService> listenerServiceClass)
Creates a
RefWatcher that reports results to the provided service, and starts watching
activity references (on ICS+). |
static boolean |
isInAnalyzerProcess(android.content.Context context)
Whether the current process is the process running the
HeapAnalyzerService, which is
a different process than the normal app process. |
static java.lang.String |
leakInfo(android.content.Context context,
HeapDump heapDump,
AnalysisResult result)
Returns a string representation of the result of a heap analysis.
|
public static RefWatcher install(android.app.Application application)
RefWatcher that works out of the box, and starts watching activity
references (on ICS+).public static RefWatcher install(android.app.Application application,
java.lang.Class<? extends AbstractAnalysisResultService> listenerServiceClass)
RefWatcher that reports results to the provided service, and starts watching
activity references (on ICS+).public static RefWatcher androidWatcher(android.app.Application app,
HeapDump.Listener heapDumpListener)
RefWatcher with a default configuration suitable for Android.public static void enableDisplayLeakActivity(android.content.Context context)
public static java.lang.String leakInfo(android.content.Context context,
HeapDump heapDump,
AnalysisResult result)
public static boolean isInAnalyzerProcess(android.content.Context context)
HeapAnalyzerService, which is
a different process than the normal app process.