-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
130 changed files
with
1,497 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
docs/api/leakcanary-android-core/leakcanary/-no name provided-.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[leakcanary-android-core](../index.md) / [leakcanary](index.md) / [<no name provided>](./-no name provided-.md) | ||
|
||
# <no name provided> | ||
|
||
`fun <no name provided>(): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | ||
|
||
Listener set in [LeakCanary.Config](-leak-canary/-config/index.md) and called by LeakCanary on a background thread when the | ||
heap analysis is complete. | ||
|
||
This is a functional interface with which you can create a [OnHeapAnalyzedListener](-on-heap-analyzed-listener/index.md) from a lambda. | ||
|
||
Usage: | ||
|
||
``` kotlin | ||
val listener = OnHeapAnalyzedListener { heapAnalysis -> | ||
process(heapAnalysis) | ||
} | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
|
||
### All Types | ||
|
||
| Name | Summary | | ||
|---|---| | ||
| [leakcanary.BackgroundTrigger](../leakcanary/-background-trigger/index.md) | | | ||
| [leakcanary.ConditionalInterceptor](../leakcanary/-conditional-interceptor/index.md) | An interceptor that runs only when [evaluateCondition](#) returns true. | | ||
| [leakcanary.GoodAndroidVersionInterceptor](../leakcanary/-good-android-version-interceptor/index.md) | | | ||
| [leakcanary.HeapAnalysisClient](../leakcanary/-heap-analysis-client/index.md) | | | ||
| [leakcanary.HeapAnalysisConfig](../leakcanary/-heap-analysis-config/index.md) | | | ||
| [leakcanary.HeapAnalysisInterceptor](../leakcanary/-heap-analysis-interceptor/index.md) | | | ||
| [leakcanary.HeapAnalysisJob](../leakcanary/-heap-analysis-job/index.md) | A [HeapAnalysisJob](../leakcanary/-heap-analysis-job/index.md) represents a single prepared request to analyze the heap. It cannot be executed twice. | | ||
| [leakcanary.JobContext](../leakcanary/-job-context/index.md) | In memory store that can be used to store objects in a given [HeapAnalysisJob](../leakcanary/-heap-analysis-job/index.md) instance. This is a simple [MutableMap](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-map/index.html) of [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) to [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html), but with unsafe generics access. | | ||
| [leakcanary.MinimumDiskSpaceInterceptor](../leakcanary/-minimum-disk-space-interceptor/index.md) | | | ||
| [leakcanary.MinimumElapsedSinceStartInterceptor](../leakcanary/-minimum-elapsed-since-start-interceptor/index.md) | | | ||
| [leakcanary.MinimumMemoryInterceptor](../leakcanary/-minimum-memory-interceptor/index.md) | | | ||
| [leakcanary.OncePerPeriodInterceptor](../leakcanary/-once-per-period-interceptor/index.md) | Proceeds once per [period](#) (of time) and then cancels all follow up jobs until [period](#) has passed. | | ||
| [leakcanary.ProcessInfo](../leakcanary/-process-info/index.md) | | | ||
| [leakcanary.SaveResourceIdsInterceptor](../leakcanary/-save-resource-ids-interceptor/index.md) | Interceptor that saves the names of R.id.* entries and their associated int values to a static field that can then be read from the heap dump. | | ||
| [leakcanary.ScreenOffTrigger](../leakcanary/-screen-off-trigger/index.md) | | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[leakcanary-android-release](./index.md) | ||
|
||
### Packages | ||
|
||
| Name | Summary | | ||
|---|---| | ||
| [leakcanary](leakcanary/index.md) | | | ||
|
||
### Index | ||
|
||
[All Types](alltypes/index.md) |
7 changes: 7 additions & 0 deletions
7
docs/api/leakcanary-android-release/leakcanary/-background-trigger/-init-.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[leakcanary-android-release](../../index.md) / [leakcanary](../index.md) / [BackgroundTrigger](index.md) / [<init>](./-init-.md) | ||
|
||
# <init> | ||
|
||
`BackgroundTrigger(application: Application, analysisClient: `[`HeapAnalysisClient`](../-heap-analysis-client/index.md)`, analysisExecutor: `[`Executor`](https://docs.oracle.com/javase/6/docs/api/java/util/concurrent/Executor.html)`, processInfo: `[`ProcessInfo`](../-process-info/index.md)` = ProcessInfo.Real, analysisCallback: (`[`HeapAnalysisJob.Result`](../-heap-analysis-job/-result/index.md)`) -> `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` = { result -> | ||
SharkLog.d { "$result" } | ||
})` |
20 changes: 20 additions & 0 deletions
20
docs/api/leakcanary-android-release/leakcanary/-background-trigger/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[leakcanary-android-release](../../index.md) / [leakcanary](../index.md) / [BackgroundTrigger](./index.md) | ||
|
||
# BackgroundTrigger | ||
|
||
`class BackgroundTrigger` | ||
|
||
### Constructors | ||
|
||
| Name | Summary | | ||
|---|---| | ||
| [<init>](-init-.md) | `BackgroundTrigger(application: Application, analysisClient: `[`HeapAnalysisClient`](../-heap-analysis-client/index.md)`, analysisExecutor: `[`Executor`](https://docs.oracle.com/javase/6/docs/api/java/util/concurrent/Executor.html)`, processInfo: `[`ProcessInfo`](../-process-info/index.md)` = ProcessInfo.Real, analysisCallback: (`[`HeapAnalysisJob.Result`](../-heap-analysis-job/-result/index.md)`) -> `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` = { result -> | ||
SharkLog.d { "$result" } | ||
})` | | ||
|
||
### Functions | ||
|
||
| Name | Summary | | ||
|---|---| | ||
| [start](start.md) | `fun start(): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | | ||
| [stop](stop.md) | `fun stop(): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | |
5 changes: 5 additions & 0 deletions
5
docs/api/leakcanary-android-release/leakcanary/-background-trigger/start.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[leakcanary-android-release](../../index.md) / [leakcanary](../index.md) / [BackgroundTrigger](index.md) / [start](./start.md) | ||
|
||
# start | ||
|
||
`fun start(): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
5 changes: 5 additions & 0 deletions
5
docs/api/leakcanary-android-release/leakcanary/-background-trigger/stop.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[leakcanary-android-release](../../index.md) / [leakcanary](../index.md) / [BackgroundTrigger](index.md) / [stop](./stop.md) | ||
|
||
# stop | ||
|
||
`fun stop(): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
8 changes: 8 additions & 0 deletions
8
docs/api/leakcanary-android-release/leakcanary/-conditional-interceptor/-init-.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[leakcanary-android-release](../../index.md) / [leakcanary](../index.md) / [ConditionalInterceptor](index.md) / [<init>](./-init-.md) | ||
|
||
# <init> | ||
|
||
`ConditionalInterceptor(delegate: `[`HeapAnalysisInterceptor`](../-heap-analysis-interceptor/index.md)`, evaluateCondition: (`[`HeapAnalysisJob`](../-heap-analysis-job/index.md)`) -> `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` | ||
|
||
An interceptor that runs only when [evaluateCondition](#) returns true. | ||
|
19 changes: 19 additions & 0 deletions
19
docs/api/leakcanary-android-release/leakcanary/-conditional-interceptor/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[leakcanary-android-release](../../index.md) / [leakcanary](../index.md) / [ConditionalInterceptor](./index.md) | ||
|
||
# ConditionalInterceptor | ||
|
||
`class ConditionalInterceptor : `[`HeapAnalysisInterceptor`](../-heap-analysis-interceptor/index.md) | ||
|
||
An interceptor that runs only when [evaluateCondition](#) returns true. | ||
|
||
### Constructors | ||
|
||
| Name | Summary | | ||
|---|---| | ||
| [<init>](-init-.md) | `ConditionalInterceptor(delegate: `[`HeapAnalysisInterceptor`](../-heap-analysis-interceptor/index.md)`, evaluateCondition: (`[`HeapAnalysisJob`](../-heap-analysis-job/index.md)`) -> `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)`<br>An interceptor that runs only when [evaluateCondition](#) returns true. | | ||
|
||
### Functions | ||
|
||
| Name | Summary | | ||
|---|---| | ||
| [intercept](intercept.md) | `fun intercept(chain: `[`HeapAnalysisInterceptor.Chain`](../-heap-analysis-interceptor/-chain/index.md)`): `[`HeapAnalysisJob.Result`](../-heap-analysis-job/-result/index.md) | |
8 changes: 8 additions & 0 deletions
8
...api/leakcanary-android-release/leakcanary/-conditional-interceptor/intercept.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[leakcanary-android-release](../../index.md) / [leakcanary](../index.md) / [ConditionalInterceptor](index.md) / [intercept](./intercept.md) | ||
|
||
# intercept | ||
|
||
`fun intercept(chain: `[`HeapAnalysisInterceptor.Chain`](../-heap-analysis-interceptor/-chain/index.md)`): `[`HeapAnalysisJob.Result`](../-heap-analysis-job/-result/index.md) | ||
|
||
Overrides [HeapAnalysisInterceptor.intercept](../-heap-analysis-interceptor/intercept.md) | ||
|
5 changes: 5 additions & 0 deletions
5
...akcanary-android-release/leakcanary/-good-android-version-interceptor/-init-.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[leakcanary-android-release](../../index.md) / [leakcanary](../index.md) / [GoodAndroidVersionInterceptor](index.md) / [<init>](./-init-.md) | ||
|
||
# <init> | ||
|
||
`GoodAndroidVersionInterceptor()` |
17 changes: 17 additions & 0 deletions
17
...eakcanary-android-release/leakcanary/-good-android-version-interceptor/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[leakcanary-android-release](../../index.md) / [leakcanary](../index.md) / [GoodAndroidVersionInterceptor](./index.md) | ||
|
||
# GoodAndroidVersionInterceptor | ||
|
||
`class GoodAndroidVersionInterceptor : `[`HeapAnalysisInterceptor`](../-heap-analysis-interceptor/index.md) | ||
|
||
### Constructors | ||
|
||
| Name | Summary | | ||
|---|---| | ||
| [<init>](-init-.md) | `GoodAndroidVersionInterceptor()` | | ||
|
||
### Functions | ||
|
||
| Name | Summary | | ||
|---|---| | ||
| [intercept](intercept.md) | `fun intercept(chain: `[`HeapAnalysisInterceptor.Chain`](../-heap-analysis-interceptor/-chain/index.md)`): `[`HeapAnalysisJob.Result`](../-heap-analysis-job/-result/index.md) | |
8 changes: 8 additions & 0 deletions
8
...anary-android-release/leakcanary/-good-android-version-interceptor/intercept.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[leakcanary-android-release](../../index.md) / [leakcanary](../index.md) / [GoodAndroidVersionInterceptor](index.md) / [intercept](./intercept.md) | ||
|
||
# intercept | ||
|
||
`fun intercept(chain: `[`HeapAnalysisInterceptor.Chain`](../-heap-analysis-interceptor/-chain/index.md)`): `[`HeapAnalysisJob.Result`](../-heap-analysis-job/-result/index.md) | ||
|
||
Overrides [HeapAnalysisInterceptor.intercept](../-heap-analysis-interceptor/intercept.md) | ||
|
5 changes: 5 additions & 0 deletions
5
docs/api/leakcanary-android-release/leakcanary/-heap-analysis-client/-init-.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[leakcanary-android-release](../../index.md) / [leakcanary](../index.md) / [HeapAnalysisClient](index.md) / [<init>](./-init-.md) | ||
|
||
# <init> | ||
|
||
`HeapAnalysisClient(heapDumpDirectoryProvider: () -> `[`File`](https://docs.oracle.com/javase/6/docs/api/java/io/File.html)`, config: `[`HeapAnalysisConfig`](../-heap-analysis-config/index.md)`, interceptors: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`HeapAnalysisInterceptor`](../-heap-analysis-interceptor/index.md)`>)` |
5 changes: 5 additions & 0 deletions
5
...canary-android-release/leakcanary/-heap-analysis-client/default-interceptors.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[leakcanary-android-release](../../index.md) / [leakcanary](../index.md) / [HeapAnalysisClient](index.md) / [defaultInterceptors](./default-interceptors.md) | ||
|
||
# defaultInterceptors | ||
|
||
`fun defaultInterceptors(application: Application): `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`HeapAnalysisInterceptor`](../-heap-analysis-interceptor/index.md)`>` |
5 changes: 5 additions & 0 deletions
5
...nary-android-release/leakcanary/-heap-analysis-client/delete-heap-dump-files.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[leakcanary-android-release](../../index.md) / [leakcanary](../index.md) / [HeapAnalysisClient](index.md) / [deleteHeapDumpFiles](./delete-heap-dump-files.md) | ||
|
||
# deleteHeapDumpFiles | ||
|
||
`fun deleteHeapDumpFiles(): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
24 changes: 24 additions & 0 deletions
24
docs/api/leakcanary-android-release/leakcanary/-heap-analysis-client/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[leakcanary-android-release](../../index.md) / [leakcanary](../index.md) / [HeapAnalysisClient](./index.md) | ||
|
||
# HeapAnalysisClient | ||
|
||
`class HeapAnalysisClient` | ||
|
||
### Constructors | ||
|
||
| Name | Summary | | ||
|---|---| | ||
| [<init>](-init-.md) | `HeapAnalysisClient(heapDumpDirectoryProvider: () -> `[`File`](https://docs.oracle.com/javase/6/docs/api/java/io/File.html)`, config: `[`HeapAnalysisConfig`](../-heap-analysis-config/index.md)`, interceptors: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`HeapAnalysisInterceptor`](../-heap-analysis-interceptor/index.md)`>)` | | ||
|
||
### Functions | ||
|
||
| Name | Summary | | ||
|---|---| | ||
| [deleteHeapDumpFiles](delete-heap-dump-files.md) | `fun deleteHeapDumpFiles(): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | | ||
| [newJob](new-job.md) | `fun newJob(context: `[`JobContext`](../-job-context/index.md)` = JobContext()): `[`HeapAnalysisJob`](../-heap-analysis-job/index.md) | | ||
|
||
### Companion Object Functions | ||
|
||
| Name | Summary | | ||
|---|---| | ||
| [defaultInterceptors](default-interceptors.md) | `fun defaultInterceptors(application: Application): `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`HeapAnalysisInterceptor`](../-heap-analysis-interceptor/index.md)`>` | |
5 changes: 5 additions & 0 deletions
5
docs/api/leakcanary-android-release/leakcanary/-heap-analysis-client/new-job.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[leakcanary-android-release](../../index.md) / [leakcanary](../index.md) / [HeapAnalysisClient](index.md) / [newJob](./new-job.md) | ||
|
||
# newJob | ||
|
||
`fun newJob(context: `[`JobContext`](../-job-context/index.md)` = JobContext()): `[`HeapAnalysisJob`](../-heap-analysis-job/index.md) |
7 changes: 7 additions & 0 deletions
7
docs/api/leakcanary-android-release/leakcanary/-heap-analysis-config/-init-.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[leakcanary-android-release](../../index.md) / [leakcanary](../index.md) / [HeapAnalysisConfig](index.md) / [<init>](./-init-.md) | ||
|
||
# <init> | ||
|
||
`HeapAnalysisConfig(referenceMatchers: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<ReferenceMatcher> = AndroidReferenceMatchers.appDefaults, objectInspectors: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<ObjectInspector> = AndroidObjectInspectors.appDefaults, metadataExtractor: MetadataExtractor = AndroidMetadataExtractor, computeRetainedHeapSize: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = true, leakingObjectFinder: LeakingObjectFinder = FilteringLeakingObjectFinder( | ||
AndroidObjectInspectors.appLeakingObjectFilters | ||
), stripHeapDump: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false)` |
16 changes: 16 additions & 0 deletions
16
...-android-release/leakcanary/-heap-analysis-config/compute-retained-heap-size.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[leakcanary-android-release](../../index.md) / [leakcanary](../index.md) / [HeapAnalysisConfig](index.md) / [computeRetainedHeapSize](./compute-retained-heap-size.md) | ||
|
||
# computeRetainedHeapSize | ||
|
||
`val computeRetainedHeapSize: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | ||
|
||
Whether to compute the retained heap size, which is the total number of bytes in memory that | ||
would be reclaimed if the detected leaks didn't happen. This includes native memory | ||
associated to Java objects (e.g. Android bitmaps). | ||
|
||
Computing the retained heap size can slow down the analysis because it requires navigating | ||
from GC roots through the entire object graph, whereas [shark.HeapAnalyzer](#) would otherwise | ||
stop as soon as all leaking instances are found. | ||
|
||
Defaults to true. | ||
|
24 changes: 24 additions & 0 deletions
24
docs/api/leakcanary-android-release/leakcanary/-heap-analysis-config/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[leakcanary-android-release](../../index.md) / [leakcanary](../index.md) / [HeapAnalysisConfig](./index.md) | ||
|
||
# HeapAnalysisConfig | ||
|
||
`data class HeapAnalysisConfig` | ||
|
||
### Constructors | ||
|
||
| Name | Summary | | ||
|---|---| | ||
| [<init>](-init-.md) | `HeapAnalysisConfig(referenceMatchers: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<ReferenceMatcher> = AndroidReferenceMatchers.appDefaults, objectInspectors: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<ObjectInspector> = AndroidObjectInspectors.appDefaults, metadataExtractor: MetadataExtractor = AndroidMetadataExtractor, computeRetainedHeapSize: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = true, leakingObjectFinder: LeakingObjectFinder = FilteringLeakingObjectFinder( | ||
AndroidObjectInspectors.appLeakingObjectFilters | ||
), stripHeapDump: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false)` | | ||
|
||
### Properties | ||
|
||
| Name | Summary | | ||
|---|---| | ||
| [computeRetainedHeapSize](compute-retained-heap-size.md) | `val computeRetainedHeapSize: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)<br>Whether to compute the retained heap size, which is the total number of bytes in memory that would be reclaimed if the detected leaks didn't happen. This includes native memory associated to Java objects (e.g. Android bitmaps). | | ||
| [leakingObjectFinder](leaking-object-finder.md) | `val leakingObjectFinder: LeakingObjectFinder`<br>Finds the objects that are leaking, for which LeakCanary will compute leak traces. | | ||
| [metadataExtractor](metadata-extractor.md) | `val metadataExtractor: MetadataExtractor`<br>Extracts metadata from a hprof to be reported in [shark.HeapAnalysisSuccess.metadata](#). Called on a background thread during heap analysis. | | ||
| [objectInspectors](object-inspectors.md) | `val objectInspectors: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<ObjectInspector>`<br>List of [ObjectInspector](#) that provide LeakCanary with insights about objects found in the heap. You can create your own [ObjectInspector](#) implementations, and also add a [shark.AppSingletonInspector](#) instance created with the list of internal singletons. | | ||
| [referenceMatchers](reference-matchers.md) | `val referenceMatchers: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<ReferenceMatcher>`<br>Known patterns of references in the heap, added here either to ignore them ([IgnoredReferenceMatcher](#)) or to mark them as library leaks ([LibraryLeakReferenceMatcher](#)). | | ||
| [stripHeapDump](strip-heap-dump.md) | `val stripHeapDump: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)<br>Whether the first step after a heap dump should be to replace the content of all arrays with zeroes. This increases the overall processing time but limits the amount of time the heap dump exists on disk with potential PII. | |
11 changes: 11 additions & 0 deletions
11
...anary-android-release/leakcanary/-heap-analysis-config/leaking-object-finder.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[leakcanary-android-release](../../index.md) / [leakcanary](../index.md) / [HeapAnalysisConfig](index.md) / [leakingObjectFinder](./leaking-object-finder.md) | ||
|
||
# leakingObjectFinder | ||
|
||
`val leakingObjectFinder: LeakingObjectFinder` | ||
|
||
Finds the objects that are leaking, for which LeakCanary will compute leak traces. | ||
|
||
Defaults to a [FilteringLeakingObjectFinder](#) that scans all objects in the heap dump and | ||
delegates the decision to [AndroidObjectInspectors.appLeakingObjectFilters](#). | ||
|
11 changes: 11 additions & 0 deletions
11
...akcanary-android-release/leakcanary/-heap-analysis-config/metadata-extractor.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[leakcanary-android-release](../../index.md) / [leakcanary](../index.md) / [HeapAnalysisConfig](index.md) / [metadataExtractor](./metadata-extractor.md) | ||
|
||
# metadataExtractor | ||
|
||
`val metadataExtractor: MetadataExtractor` | ||
|
||
Extracts metadata from a hprof to be reported in [shark.HeapAnalysisSuccess.metadata](#). | ||
Called on a background thread during heap analysis. | ||
|
||
Defaults to [AndroidMetadataExtractor](#) | ||
|
12 changes: 12 additions & 0 deletions
12
...eakcanary-android-release/leakcanary/-heap-analysis-config/object-inspectors.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[leakcanary-android-release](../../index.md) / [leakcanary](../index.md) / [HeapAnalysisConfig](index.md) / [objectInspectors](./object-inspectors.md) | ||
|
||
# objectInspectors | ||
|
||
`val objectInspectors: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<ObjectInspector>` | ||
|
||
List of [ObjectInspector](#) that provide LeakCanary with insights about objects found in the | ||
heap. You can create your own [ObjectInspector](#) implementations, and also add | ||
a [shark.AppSingletonInspector](#) instance created with the list of internal singletons. | ||
|
||
Defaults to [AndroidObjectInspectors.appDefaults](#) | ||
|
16 changes: 16 additions & 0 deletions
16
...akcanary-android-release/leakcanary/-heap-analysis-config/reference-matchers.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[leakcanary-android-release](../../index.md) / [leakcanary](../index.md) / [HeapAnalysisConfig](index.md) / [referenceMatchers](./reference-matchers.md) | ||
|
||
# referenceMatchers | ||
|
||
`val referenceMatchers: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<ReferenceMatcher>` | ||
|
||
Known patterns of references in the heap, added here either to ignore them | ||
([IgnoredReferenceMatcher](#)) or to mark them as library leaks ([LibraryLeakReferenceMatcher](#)). | ||
|
||
When adding your own custom [LibraryLeakReferenceMatcher](#) instances, you'll most | ||
likely want to set [LibraryLeakReferenceMatcher.patternApplies](#) with a filter that checks | ||
for the Android OS version and manufacturer. The build information can be obtained by calling | ||
[shark.AndroidBuildMirror.fromHeapGraph](#). | ||
|
||
Defaults to [AndroidReferenceMatchers.appDefaults](#) | ||
|
10 changes: 10 additions & 0 deletions
10
.../leakcanary-android-release/leakcanary/-heap-analysis-config/strip-heap-dump.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[leakcanary-android-release](../../index.md) / [leakcanary](../index.md) / [HeapAnalysisConfig](index.md) / [stripHeapDump](./strip-heap-dump.md) | ||
|
||
# stripHeapDump | ||
|
||
`val stripHeapDump: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | ||
|
||
Whether the first step after a heap dump should be to replace the content of all arrays with | ||
zeroes. This increases the overall processing time but limits the amount of time the heap | ||
dump exists on disk with potential PII. | ||
|
Oops, something went wrong.