-
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
168 changed files
with
1,046 additions
and
433 deletions.
There are no files selected for viewing
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
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
29 changes: 29 additions & 0 deletions
29
...eakcanary-android-core/leakcanary/-leak-canary/-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,29 @@ | ||
[leakcanary-android-core](../../../index.md) / [leakcanary](../../index.md) / [LeakCanary](../index.md) / [Config](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 [KeyedWeakReferenceFinder](#) which finds all objects tracked by a | ||
[KeyedWeakReference](#), ie all objects that were passed to [ObjectWatcher.watch](#). | ||
|
||
You could instead replace it with a [FilteringLeakingObjectFinder](#), which scans all objects | ||
in the heap dump and delegates the decision to a list of | ||
[FilteringLeakingObjectFinder.LeakingObjectFilter](#). This can lead to finding more leaks | ||
than the default and shorter leak traces. This also means that every analysis during a | ||
given process life will bring up the same leaking objects over and over again, unlike | ||
when using [KeyedWeakReferenceFinder](#) (because [KeyedWeakReference](#) instances are cleared | ||
after each heap dump). | ||
|
||
The list of filters can be built from [AndroidObjectInspectors](#): | ||
|
||
``` | ||
LeakCanary.config = LeakCanary.config.copy( | ||
leakingObjectFinder = FilteringLeakingObjectFinder( | ||
AndroidObjectInspectors.appLeakingObjectFilters | ||
) | ||
) | ||
``` | ||
|
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
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
17 changes: 17 additions & 0 deletions
17
docs/api/leakcanary-object-watcher/leakcanary/-clock/invoke.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-object-watcher](../../index.md) / [leakcanary](../index.md) / [Clock](index.md) / [invoke](./invoke.md) | ||
|
||
# invoke | ||
|
||
`inline operator fun invoke(crossinline block: () -> `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`): `[`Clock`](index.md) | ||
|
||
Utility function to create a [Clock](index.md) from the passed in [block](invoke.md#leakcanary.Clock.Companion$invoke(kotlin.Function0((kotlin.Long)))/block) lambda | ||
instead of using the anonymous `object : Clock` syntax. | ||
|
||
Usage: | ||
|
||
``` kotlin | ||
val clock = Clock { | ||
|
||
} | ||
``` | ||
|
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
5 changes: 5 additions & 0 deletions
5
docs/api/leakcanary-object-watcher/leakcanary/-keyed-weak-reference/description.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-object-watcher](../../index.md) / [leakcanary](../index.md) / [KeyedWeakReference](index.md) / [description](./description.md) | ||
|
||
# description | ||
|
||
`val description: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
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
5 changes: 0 additions & 5 deletions
5
docs/api/leakcanary-object-watcher/leakcanary/-keyed-weak-reference/name.md
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.