From 7c56f23ebe572146376e1854a763cdd3860ac542 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Ricau Date: Tue, 31 Dec 2019 09:33:01 -0800 Subject: [PATCH] Prepare 2.1 release --- .../leakcanary/-leak-canary/-config/-init-.md | 2 +- .../leakcanary/-leak-canary/-config/index.md | 5 +-- .../-config/leaking-object-finder.md | 29 +++++++++++++++++ .../-config/use-experimental-leak-finders.md | 10 ++---- .../leakcanary/-clock/index.md | 8 +++++ .../leakcanary/-clock/invoke.md | 17 ++++++++++ .../-keyed-weak-reference/-init-.md | 2 +- .../-keyed-weak-reference/description.md | 5 +++ .../leakcanary/-keyed-weak-reference/index.md | 4 +-- .../leakcanary/-keyed-weak-reference/name.md | 5 --- .../leakcanary/-object-watcher/index.md | 2 +- .../leakcanary/-object-watcher/watch.md | 7 ++-- docs/api/shark-android/alltypes/index.md | 1 + .../app-leaking-object-filters.md | 8 +++++ .../create-leaking-object-filters.md | 8 +++++ .../shark/-android-object-inspectors/index.md | 7 ++++ .../shark/-android-resource-id-names/get.md | 5 +++ .../shark/-android-resource-id-names/index.md | 18 +++++++++++ .../read-from-heap.md | 5 +++ .../save-to-memory.md | 15 +++++++++ docs/api/shark-android/shark/index.md | 7 +--- .../shark/unwrap-activity-context.md | 9 ------ .../shark-graph/shark/-heap-graph/index.md | 2 ++ .../shark/-heap-graph/object-arrays.md | 10 ++++++ .../shark/-heap-graph/primitive-arrays.md | 10 ++++++ .../shark/-heap-object/-heap-class/index.md | 5 +++ .../-heap-class/is-array-class.md | 8 +++++ .../-heap-class/is-object-array-class.md | 5 +++ .../-heap-class/is-primitive-array-class.md | 5 +++ .../-heap-class/object-array-instances.md | 5 +++ .../-heap-class/primitive-array-instances.md | 5 +++ .../-heap-primitive-array/array-class.md | 8 +++++ .../-heap-primitive-array/index.md | 1 + .../shark/-hprof-heap-graph/index-hprof.md | 28 +++++++++++++++- .../shark/-hprof-heap-graph/index.md | 30 ++++++++++++++++- .../shark/-hprof-heap-graph/object-arrays.md | 12 +++++++ .../-hprof-heap-graph/primitive-arrays.md | 12 +++++++ docs/api/shark/alltypes/index.md | 10 +++--- .../shark/shark/-application-leak/-init-.md | 2 +- .../shark/-application-leak/class-name.md | 11 ------- .../-application-leak/create-group-hash.md | 8 ----- .../shark/shark/-application-leak/index.md | 12 +++---- .../shark/-application-leak/leak-trace.md | 10 ------ .../shark/-application-leak/leak-traces.md | 10 ++++++ .../retained-heap-byte-size.md | 11 ------- .../-application-leak/short-description.md | 8 +++++ .../shark/-application-leak/signature.md | 13 ++++++++ .../-init-.md | 9 ++++++ .../-leaking-object-filter/index.md | 13 ++++++++ .../is-leaking-object.md | 9 ++++++ .../find-leaking-object-ids.md | 10 ++++++ .../-filtering-leaking-object-finder/index.md | 26 +++++++++++++++ .../shark/-heap-analysis-success/all-leaks.md | 2 +- .../shark/-heap-analysis-success/index.md | 8 ++++- .../upgrade-from20-deserialized.md | 9 ++++++ .../api/shark/shark/-heap-analyzer/analyze.md | 3 +- docs/api/shark/shark/-heap-analyzer/index.md | 2 +- .../find-leaking-object-ids.md | 10 ++++++ .../-keyed-weak-reference-finder/index.md | 14 ++++++++ .../shark/-leak-node-status/-l-e-a-k-i-n-g.md | 8 ----- .../-n-o-t_-l-e-a-k-i-n-g.md | 8 ----- .../shark/-leak-node-status/-u-n-k-n-o-w-n.md | 8 ----- .../shark/shark/-leak-node-status/index.md | 13 -------- .../api/shark/shark/-leak-reference/-init-.md | 8 ----- .../shark/-leak-reference/display-name.md | 5 --- .../shark/-leak-reference/grouping-name.md | 5 --- docs/api/shark/shark/-leak-reference/index.md | 22 ------------- docs/api/shark/shark/-leak-reference/name.md | 5 --- docs/api/shark/shark/-leak-reference/type.md | 5 --- .../-holder/-o-b-j-e-c-t.md | 5 --- .../-holder/-t-h-r-e-a-d.md | 5 --- .../shark/shark/-leak-trace-element/-init-.md | 5 --- .../-type/-a-r-r-a-y_-e-n-t-r-y.md | 5 --- .../-type/-i-n-s-t-a-n-c-e_-f-i-e-l-d.md | 5 --- .../-type/-s-t-a-t-i-c_-f-i-e-l-d.md | 5 --- .../shark/-leak-trace-element/class-name.md | 5 --- .../-leak-trace-element/class-simple-name.md | 8 ----- .../shark/shark/-leak-trace-element/holder.md | 5 --- .../shark/shark/-leak-trace-element/index.md | 30 ----------------- .../-leak-trace-element/leak-status-reason.md | 5 --- .../shark/-leak-trace-element/leak-status.md | 5 --- .../shark/-leak-trace-element/reference.md | 10 ------ .../shark/shark/-leak-trace-object/-init-.md | 5 +++ .../-leaking-status/-l-e-a-k-i-n-g.md | 8 +++++ .../-leaking-status/-n-o-t_-l-e-a-k-i-n-g.md | 8 +++++ .../-leaking-status/-u-n-k-n-o-w-n.md | 8 +++++ .../-leaking-status/index.md | 13 ++++++++ .../-object-type}/-a-r-r-a-y.md | 2 +- .../-object-type}/-c-l-a-s-s.md | 2 +- .../-object-type/-i-n-s-t-a-n-c-e.md | 5 +++ .../-object-type}/index.md | 9 +++--- .../class-name.md | 6 ++-- .../-leak-trace-object/class-simple-name.md | 9 ++++++ .../shark/shark/-leak-trace-object/index.md | 30 +++++++++++++++++ .../labels.md | 4 +-- .../leaking-status-reason.md | 5 +++ .../-leak-trace-object/leaking-status.md | 5 +++ .../shark/-leak-trace-object/type-name.md | 5 +++ .../shark/shark/-leak-trace-object/type.md | 5 +++ .../shark/-leak-trace-reference/-init-.md | 11 +++++++ .../-reference-type/-a-r-r-a-y_-e-n-t-r-y.md | 5 +++ .../-i-n-s-t-a-n-c-e_-f-i-e-l-d.md | 5 +++ .../-reference-type}/-l-o-c-a-l.md | 2 +- .../-s-t-a-t-i-c_-f-i-e-l-d.md | 5 +++ .../-reference-type}/index.md | 6 ++-- .../shark/-leak-trace-reference/index.md | 32 +++++++++++++++++++ .../-leak-trace-reference/origin-object.md | 5 +++ .../reference-display-name.md | 5 +++ .../reference-generic-name.md | 5 +++ .../-leak-trace-reference/reference-name.md | 5 +++ .../-leak-trace-reference/reference-type.md | 5 +++ .../-gc-root-type/-j-a-v-a_-f-r-a-m-e.md | 11 +++++++ .../-gc-root-type/-j-n-i_-g-l-o-b-a-l.md | 11 +++++++ .../-gc-root-type/-j-n-i_-l-o-c-a-l.md | 11 +++++++ .../-gc-root-type/-j-n-i_-m-o-n-i-t-o-r.md | 11 +++++++ .../-gc-root-type/-m-o-n-i-t-o-r_-u-s-e-d.md | 11 +++++++ .../-gc-root-type/-n-a-t-i-v-e_-s-t-a-c-k.md | 11 +++++++ .../-gc-root-type/-s-t-i-c-k-y_-c-l-a-s-s.md | 11 +++++++ .../-gc-root-type/-t-h-r-e-a-d_-b-l-o-c-k.md | 11 +++++++ .../-t-h-r-e-a-d_-o-b-j-e-c-t.md | 11 +++++++ .../-leak-trace/-gc-root-type/description.md | 5 +++ .../-leak-trace/-gc-root-type/from-gc-root.md | 5 +++ .../shark/-leak-trace/-gc-root-type/index.md | 31 ++++++++++++++++++ docs/api/shark/shark/-leak-trace/-init-.md | 14 +++++--- .../-leak-trace/element-may-be-leak-cause.md | 5 --- docs/api/shark/shark/-leak-trace/elements.md | 5 --- .../shark/shark/-leak-trace/gc-root-type.md | 9 ++++++ docs/api/shark/shark/-leak-trace/index.md | 29 +++++++++++++---- .../shark/shark/-leak-trace/leak-causes.md | 5 --- .../shark/shark/-leak-trace/leaking-object.md | 5 +++ .../reference-path-element-is-suspect.md | 11 +++++++ .../shark/shark/-leak-trace/reference-path.md | 5 +++ .../-leak-trace/retained-heap-byte-size.md | 9 ++++++ docs/api/shark/shark/-leak-trace/signature.md | 11 +++++++ .../-leak-trace/suspect-reference-subpath.md | 9 ++++++ .../-leak-trace/to-simple-path-string.md | 5 +++ docs/api/shark/shark/-leak/class-name.md | 9 ------ .../shark/shark/-leak/class-simple-name.md | 8 ----- .../shark/shark/-leak/create-group-hash.md | 5 --- docs/api/shark/shark/-leak/group-hash.md | 11 ------- docs/api/shark/shark/-leak/index.md | 10 +++--- docs/api/shark/shark/-leak/leak-trace.md | 8 ----- docs/api/shark/shark/-leak/leak-traces.md | 8 +++++ .../shark/-leak/retained-heap-byte-size.md | 9 ------ .../shark/shark/-leak/short-description.md | 5 +++ docs/api/shark/shark/-leak/signature.md | 11 +++++++ .../-leak/total-retained-heap-byte-size.md | 9 ++++++ .../find-leaking-object-ids.md | 8 +++++ .../shark/-leaking-object-finder/index.md | 29 +++++++++++++++++ .../shark/-leaking-object-finder/invoke.md | 17 ++++++++++ docs/api/shark/shark/-library-leak/-init-.md | 2 +- .../shark/-library-leak/create-group-hash.md | 8 ----- docs/api/shark/shark/-library-leak/index.md | 14 ++++---- .../shark/shark/-library-leak/leak-trace.md | 10 ------ .../shark/shark/-library-leak/leak-traces.md | 10 ++++++ docs/api/shark/shark/-library-leak/pattern.md | 2 +- .../-library-leak/retained-heap-byte-size.md | 11 ------- .../shark/-library-leak/short-description.md | 8 +++++ .../shark/shark/-library-leak/signature.md | 13 ++++++++ .../create-leaking-object-filters.md | 8 +++++ .../shark/shark/-object-inspectors/index.md | 7 ++++ .../jdk-leaking-object-filters.md | 8 +++++ .../api/shark/shark/-object-reporter/index.md | 2 +- .../shark/-object-reporter/leaking-reasons.md | 4 --- .../likely-leaking-reasons.md | 7 ++-- docs/api/shark/shark/index.md | 10 +++--- gradle.properties | 2 +- mkdocs.yml | 4 +-- 168 files changed, 1046 insertions(+), 433 deletions(-) create mode 100644 docs/api/leakcanary-android-core/leakcanary/-leak-canary/-config/leaking-object-finder.md create mode 100644 docs/api/leakcanary-object-watcher/leakcanary/-clock/invoke.md create mode 100644 docs/api/leakcanary-object-watcher/leakcanary/-keyed-weak-reference/description.md delete mode 100644 docs/api/leakcanary-object-watcher/leakcanary/-keyed-weak-reference/name.md create mode 100644 docs/api/shark-android/shark/-android-object-inspectors/app-leaking-object-filters.md create mode 100644 docs/api/shark-android/shark/-android-object-inspectors/create-leaking-object-filters.md create mode 100644 docs/api/shark-android/shark/-android-resource-id-names/get.md create mode 100644 docs/api/shark-android/shark/-android-resource-id-names/index.md create mode 100644 docs/api/shark-android/shark/-android-resource-id-names/read-from-heap.md create mode 100644 docs/api/shark-android/shark/-android-resource-id-names/save-to-memory.md delete mode 100644 docs/api/shark-android/shark/unwrap-activity-context.md create mode 100644 docs/api/shark-graph/shark/-heap-graph/object-arrays.md create mode 100644 docs/api/shark-graph/shark/-heap-graph/primitive-arrays.md create mode 100644 docs/api/shark-graph/shark/-heap-object/-heap-class/is-array-class.md create mode 100644 docs/api/shark-graph/shark/-heap-object/-heap-class/is-object-array-class.md create mode 100644 docs/api/shark-graph/shark/-heap-object/-heap-class/is-primitive-array-class.md create mode 100644 docs/api/shark-graph/shark/-heap-object/-heap-class/object-array-instances.md create mode 100644 docs/api/shark-graph/shark/-heap-object/-heap-class/primitive-array-instances.md create mode 100644 docs/api/shark-graph/shark/-heap-object/-heap-primitive-array/array-class.md create mode 100644 docs/api/shark-graph/shark/-hprof-heap-graph/object-arrays.md create mode 100644 docs/api/shark-graph/shark/-hprof-heap-graph/primitive-arrays.md delete mode 100644 docs/api/shark/shark/-application-leak/class-name.md delete mode 100644 docs/api/shark/shark/-application-leak/create-group-hash.md delete mode 100644 docs/api/shark/shark/-application-leak/leak-trace.md create mode 100644 docs/api/shark/shark/-application-leak/leak-traces.md delete mode 100644 docs/api/shark/shark/-application-leak/retained-heap-byte-size.md create mode 100644 docs/api/shark/shark/-application-leak/short-description.md create mode 100644 docs/api/shark/shark/-application-leak/signature.md create mode 100644 docs/api/shark/shark/-filtering-leaking-object-finder/-init-.md create mode 100644 docs/api/shark/shark/-filtering-leaking-object-finder/-leaking-object-filter/index.md create mode 100644 docs/api/shark/shark/-filtering-leaking-object-finder/-leaking-object-filter/is-leaking-object.md create mode 100644 docs/api/shark/shark/-filtering-leaking-object-finder/find-leaking-object-ids.md create mode 100644 docs/api/shark/shark/-filtering-leaking-object-finder/index.md create mode 100644 docs/api/shark/shark/-heap-analysis-success/upgrade-from20-deserialized.md create mode 100644 docs/api/shark/shark/-keyed-weak-reference-finder/find-leaking-object-ids.md create mode 100644 docs/api/shark/shark/-keyed-weak-reference-finder/index.md delete mode 100644 docs/api/shark/shark/-leak-node-status/-l-e-a-k-i-n-g.md delete mode 100644 docs/api/shark/shark/-leak-node-status/-n-o-t_-l-e-a-k-i-n-g.md delete mode 100644 docs/api/shark/shark/-leak-node-status/-u-n-k-n-o-w-n.md delete mode 100644 docs/api/shark/shark/-leak-node-status/index.md delete mode 100644 docs/api/shark/shark/-leak-reference/-init-.md delete mode 100644 docs/api/shark/shark/-leak-reference/display-name.md delete mode 100644 docs/api/shark/shark/-leak-reference/grouping-name.md delete mode 100644 docs/api/shark/shark/-leak-reference/index.md delete mode 100644 docs/api/shark/shark/-leak-reference/name.md delete mode 100644 docs/api/shark/shark/-leak-reference/type.md delete mode 100644 docs/api/shark/shark/-leak-trace-element/-holder/-o-b-j-e-c-t.md delete mode 100644 docs/api/shark/shark/-leak-trace-element/-holder/-t-h-r-e-a-d.md delete mode 100644 docs/api/shark/shark/-leak-trace-element/-init-.md delete mode 100644 docs/api/shark/shark/-leak-trace-element/-type/-a-r-r-a-y_-e-n-t-r-y.md delete mode 100644 docs/api/shark/shark/-leak-trace-element/-type/-i-n-s-t-a-n-c-e_-f-i-e-l-d.md delete mode 100644 docs/api/shark/shark/-leak-trace-element/-type/-s-t-a-t-i-c_-f-i-e-l-d.md delete mode 100644 docs/api/shark/shark/-leak-trace-element/class-name.md delete mode 100644 docs/api/shark/shark/-leak-trace-element/class-simple-name.md delete mode 100644 docs/api/shark/shark/-leak-trace-element/holder.md delete mode 100644 docs/api/shark/shark/-leak-trace-element/index.md delete mode 100644 docs/api/shark/shark/-leak-trace-element/leak-status-reason.md delete mode 100644 docs/api/shark/shark/-leak-trace-element/leak-status.md delete mode 100644 docs/api/shark/shark/-leak-trace-element/reference.md create mode 100644 docs/api/shark/shark/-leak-trace-object/-init-.md create mode 100644 docs/api/shark/shark/-leak-trace-object/-leaking-status/-l-e-a-k-i-n-g.md create mode 100644 docs/api/shark/shark/-leak-trace-object/-leaking-status/-n-o-t_-l-e-a-k-i-n-g.md create mode 100644 docs/api/shark/shark/-leak-trace-object/-leaking-status/-u-n-k-n-o-w-n.md create mode 100644 docs/api/shark/shark/-leak-trace-object/-leaking-status/index.md rename docs/api/shark/shark/{-leak-trace-element/-holder => -leak-trace-object/-object-type}/-a-r-r-a-y.md (52%) rename docs/api/shark/shark/{-leak-trace-element/-holder => -leak-trace-object/-object-type}/-c-l-a-s-s.md (52%) create mode 100644 docs/api/shark/shark/-leak-trace-object/-object-type/-i-n-s-t-a-n-c-e.md rename docs/api/shark/shark/{-leak-trace-element/-holder => -leak-trace-object/-object-type}/index.md (55%) rename docs/api/shark/shark/{-library-leak => -leak-trace-object}/class-name.md (58%) create mode 100644 docs/api/shark/shark/-leak-trace-object/class-simple-name.md create mode 100644 docs/api/shark/shark/-leak-trace-object/index.md rename docs/api/shark/shark/{-leak-trace-element => -leak-trace-object}/labels.md (66%) create mode 100644 docs/api/shark/shark/-leak-trace-object/leaking-status-reason.md create mode 100644 docs/api/shark/shark/-leak-trace-object/leaking-status.md create mode 100644 docs/api/shark/shark/-leak-trace-object/type-name.md create mode 100644 docs/api/shark/shark/-leak-trace-object/type.md create mode 100644 docs/api/shark/shark/-leak-trace-reference/-init-.md create mode 100644 docs/api/shark/shark/-leak-trace-reference/-reference-type/-a-r-r-a-y_-e-n-t-r-y.md create mode 100644 docs/api/shark/shark/-leak-trace-reference/-reference-type/-i-n-s-t-a-n-c-e_-f-i-e-l-d.md rename docs/api/shark/shark/{-leak-trace-element/-type => -leak-trace-reference/-reference-type}/-l-o-c-a-l.md (50%) create mode 100644 docs/api/shark/shark/-leak-trace-reference/-reference-type/-s-t-a-t-i-c_-f-i-e-l-d.md rename docs/api/shark/shark/{-leak-trace-element/-type => -leak-trace-reference/-reference-type}/index.md (75%) create mode 100644 docs/api/shark/shark/-leak-trace-reference/index.md create mode 100644 docs/api/shark/shark/-leak-trace-reference/origin-object.md create mode 100644 docs/api/shark/shark/-leak-trace-reference/reference-display-name.md create mode 100644 docs/api/shark/shark/-leak-trace-reference/reference-generic-name.md create mode 100644 docs/api/shark/shark/-leak-trace-reference/reference-name.md create mode 100644 docs/api/shark/shark/-leak-trace-reference/reference-type.md create mode 100644 docs/api/shark/shark/-leak-trace/-gc-root-type/-j-a-v-a_-f-r-a-m-e.md create mode 100644 docs/api/shark/shark/-leak-trace/-gc-root-type/-j-n-i_-g-l-o-b-a-l.md create mode 100644 docs/api/shark/shark/-leak-trace/-gc-root-type/-j-n-i_-l-o-c-a-l.md create mode 100644 docs/api/shark/shark/-leak-trace/-gc-root-type/-j-n-i_-m-o-n-i-t-o-r.md create mode 100644 docs/api/shark/shark/-leak-trace/-gc-root-type/-m-o-n-i-t-o-r_-u-s-e-d.md create mode 100644 docs/api/shark/shark/-leak-trace/-gc-root-type/-n-a-t-i-v-e_-s-t-a-c-k.md create mode 100644 docs/api/shark/shark/-leak-trace/-gc-root-type/-s-t-i-c-k-y_-c-l-a-s-s.md create mode 100644 docs/api/shark/shark/-leak-trace/-gc-root-type/-t-h-r-e-a-d_-b-l-o-c-k.md create mode 100644 docs/api/shark/shark/-leak-trace/-gc-root-type/-t-h-r-e-a-d_-o-b-j-e-c-t.md create mode 100644 docs/api/shark/shark/-leak-trace/-gc-root-type/description.md create mode 100644 docs/api/shark/shark/-leak-trace/-gc-root-type/from-gc-root.md create mode 100644 docs/api/shark/shark/-leak-trace/-gc-root-type/index.md delete mode 100644 docs/api/shark/shark/-leak-trace/element-may-be-leak-cause.md delete mode 100644 docs/api/shark/shark/-leak-trace/elements.md create mode 100644 docs/api/shark/shark/-leak-trace/gc-root-type.md delete mode 100644 docs/api/shark/shark/-leak-trace/leak-causes.md create mode 100644 docs/api/shark/shark/-leak-trace/leaking-object.md create mode 100644 docs/api/shark/shark/-leak-trace/reference-path-element-is-suspect.md create mode 100644 docs/api/shark/shark/-leak-trace/reference-path.md create mode 100644 docs/api/shark/shark/-leak-trace/retained-heap-byte-size.md create mode 100644 docs/api/shark/shark/-leak-trace/signature.md create mode 100644 docs/api/shark/shark/-leak-trace/suspect-reference-subpath.md create mode 100644 docs/api/shark/shark/-leak-trace/to-simple-path-string.md delete mode 100644 docs/api/shark/shark/-leak/class-name.md delete mode 100644 docs/api/shark/shark/-leak/class-simple-name.md delete mode 100644 docs/api/shark/shark/-leak/create-group-hash.md delete mode 100644 docs/api/shark/shark/-leak/group-hash.md delete mode 100644 docs/api/shark/shark/-leak/leak-trace.md create mode 100644 docs/api/shark/shark/-leak/leak-traces.md delete mode 100644 docs/api/shark/shark/-leak/retained-heap-byte-size.md create mode 100644 docs/api/shark/shark/-leak/short-description.md create mode 100644 docs/api/shark/shark/-leak/signature.md create mode 100644 docs/api/shark/shark/-leak/total-retained-heap-byte-size.md create mode 100644 docs/api/shark/shark/-leaking-object-finder/find-leaking-object-ids.md create mode 100644 docs/api/shark/shark/-leaking-object-finder/index.md create mode 100644 docs/api/shark/shark/-leaking-object-finder/invoke.md delete mode 100644 docs/api/shark/shark/-library-leak/create-group-hash.md delete mode 100644 docs/api/shark/shark/-library-leak/leak-trace.md create mode 100644 docs/api/shark/shark/-library-leak/leak-traces.md delete mode 100644 docs/api/shark/shark/-library-leak/retained-heap-byte-size.md create mode 100644 docs/api/shark/shark/-library-leak/short-description.md create mode 100644 docs/api/shark/shark/-library-leak/signature.md create mode 100644 docs/api/shark/shark/-object-inspectors/create-leaking-object-filters.md create mode 100644 docs/api/shark/shark/-object-inspectors/jdk-leaking-object-filters.md diff --git a/docs/api/leakcanary-android-core/leakcanary/-leak-canary/-config/-init-.md b/docs/api/leakcanary-android-core/leakcanary/-leak-canary/-config/-init-.md index 612fd0f7b8..e9620f1b79 100644 --- a/docs/api/leakcanary-android-core/leakcanary/-leak-canary/-config/-init-.md +++ b/docs/api/leakcanary-android-core/leakcanary/-leak-canary/-config/-init-.md @@ -2,7 +2,7 @@ # <init> -`Config(dumpHeap: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = true, dumpHeapWhenDebugging: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false, retainedVisibleThreshold: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` = 5, referenceMatchers: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)` = AndroidReferenceMatchers.appDefaults, objectInspectors: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)` = AndroidObjectInspectors.appDefaults, onHeapAnalyzedListener: `[`OnHeapAnalyzedListener`](../../-on-heap-analyzed-listener/index.md)` = DefaultOnHeapAnalyzedListener.create(), metatadaExtractor: MetadataExtractor = AndroidMetadataExtractor, computeRetainedHeapSize: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = true, maxStoredHeapDumps: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` = 7, requestWriteExternalStoragePermission: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false, useExperimentalLeakFinders: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false)` +`Config(dumpHeap: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = true, dumpHeapWhenDebugging: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false, retainedVisibleThreshold: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` = 5, referenceMatchers: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)` = AndroidReferenceMatchers.appDefaults, objectInspectors: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)` = AndroidObjectInspectors.appDefaults, onHeapAnalyzedListener: `[`OnHeapAnalyzedListener`](../../-on-heap-analyzed-listener/index.md)` = DefaultOnHeapAnalyzedListener.create(), metatadaExtractor: MetadataExtractor = AndroidMetadataExtractor, computeRetainedHeapSize: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = true, maxStoredHeapDumps: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` = 7, requestWriteExternalStoragePermission: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false, leakingObjectFinder: LeakingObjectFinder = KeyedWeakReferenceFinder, useExperimentalLeakFinders: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false)` LeakCanary configuration data class. Properties can be updated via [copy](#). diff --git a/docs/api/leakcanary-android-core/leakcanary/-leak-canary/-config/index.md b/docs/api/leakcanary-android-core/leakcanary/-leak-canary/-config/index.md index 02b20f3e78..3cc3d0c693 100644 --- a/docs/api/leakcanary-android-core/leakcanary/-leak-canary/-config/index.md +++ b/docs/api/leakcanary-android-core/leakcanary/-leak-canary/-config/index.md @@ -14,7 +14,7 @@ LeakCanary configuration data class. Properties can be updated via [copy](#). | Name | Summary | |---|---| -| [<init>](-init-.md) | `Config(dumpHeap: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = true, dumpHeapWhenDebugging: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false, retainedVisibleThreshold: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` = 5, referenceMatchers: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)` = AndroidReferenceMatchers.appDefaults, objectInspectors: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)` = AndroidObjectInspectors.appDefaults, onHeapAnalyzedListener: `[`OnHeapAnalyzedListener`](../../-on-heap-analyzed-listener/index.md)` = DefaultOnHeapAnalyzedListener.create(), metatadaExtractor: MetadataExtractor = AndroidMetadataExtractor, computeRetainedHeapSize: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = true, maxStoredHeapDumps: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` = 7, requestWriteExternalStoragePermission: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false, useExperimentalLeakFinders: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false)`
LeakCanary configuration data class. Properties can be updated via [copy](#). | +| [<init>](-init-.md) | `Config(dumpHeap: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = true, dumpHeapWhenDebugging: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false, retainedVisibleThreshold: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` = 5, referenceMatchers: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)` = AndroidReferenceMatchers.appDefaults, objectInspectors: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)` = AndroidObjectInspectors.appDefaults, onHeapAnalyzedListener: `[`OnHeapAnalyzedListener`](../../-on-heap-analyzed-listener/index.md)` = DefaultOnHeapAnalyzedListener.create(), metatadaExtractor: MetadataExtractor = AndroidMetadataExtractor, computeRetainedHeapSize: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = true, maxStoredHeapDumps: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` = 7, requestWriteExternalStoragePermission: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false, leakingObjectFinder: LeakingObjectFinder = KeyedWeakReferenceFinder, useExperimentalLeakFinders: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false)`
LeakCanary configuration data class. Properties can be updated via [copy](#). | ### Properties @@ -23,6 +23,7 @@ LeakCanary configuration data class. Properties can be updated via [copy](#). | [computeRetainedHeapSize](compute-retained-heap-size.md) | `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). | | [dumpHeap](dump-heap.md) | `val dumpHeap: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)
Whether LeakCanary should dump the heap when enough retained instances are found. This needs to be true for LeakCanary to work, but sometimes you may want to temporarily disable LeakCanary (e.g. for a product demo). | | [dumpHeapWhenDebugging](dump-heap-when-debugging.md) | `val dumpHeapWhenDebugging: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)
If [dumpHeapWhenDebugging](dump-heap-when-debugging.md) is false then LeakCanary will not dump the heap when the debugger is attached. The debugger can create temporary memory leaks (for instance if a thread is blocked on a breakpoint). | +| [leakingObjectFinder](leaking-object-finder.md) | `val leakingObjectFinder: LeakingObjectFinder`
Finds the objects that are leaking, for which LeakCanary will compute leak traces. | | [maxStoredHeapDumps](max-stored-heap-dumps.md) | `val maxStoredHeapDumps: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)
How many heap dumps are kept on the Android device for this app package. When this threshold is reached LeakCanary deletes the older heap dumps. As several heap dumps may be enqueued you should avoid going down to 1 or 2. | | [metatadaExtractor](metatada-extractor.md) | `val metatadaExtractor: MetadataExtractor`
Extracts metadata from a hprof to be reported in [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)``
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. | @@ -30,4 +31,4 @@ LeakCanary configuration data class. Properties can be updated via [copy](#). | [referenceMatchers](reference-matchers.md) | `val referenceMatchers: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)``
Known patterns of references in the heap, lister here either to ignore them ([IgnoredReferenceMatcher](#)) or to mark them as library leaks ([LibraryLeakReferenceMatcher](#)). | | [requestWriteExternalStoragePermission](request-write-external-storage-permission.md) | `val requestWriteExternalStoragePermission: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)
LeakCanary always attempts to store heap dumps on the external storage if the WRITE_EXTERNAL_STORAGE is already granted, and otherwise uses the app storage. If the WRITE_EXTERNAL_STORAGE permission is not granted and [requestWriteExternalStoragePermission](request-write-external-storage-permission.md) is true, then LeakCanary will display a notification to ask for that permission. | | [retainedVisibleThreshold](retained-visible-threshold.md) | `val retainedVisibleThreshold: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)
When the app is visible, LeakCanary will wait for at least [retainedVisibleThreshold](retained-visible-threshold.md) retained instances before dumping the heap. Dumping the heap freezes the UI and can be frustrating for developers who are trying to work. This is especially frustrating as the Android Framework has a number of leaks that cannot easily be fixed. | -| [useExperimentalLeakFinders](use-experimental-leak-finders.md) | `val useExperimentalLeakFinders: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)
When true, [objectInspectors](object-inspectors.md) are used to find leaks instead of only checking instances tracked by [KeyedWeakReference](#). This leads to finding more leaks and shorter leak traces. However this also means the same leaking instances will be found in every heap dump for a given process life. | +| [useExperimentalLeakFinders](use-experimental-leak-finders.md) | `val ~~useExperimentalLeakFinders~~: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)
Deprecated: This is a no-op, set a custom [leakingObjectFinder](leaking-object-finder.md) instead. | diff --git a/docs/api/leakcanary-android-core/leakcanary/-leak-canary/-config/leaking-object-finder.md b/docs/api/leakcanary-android-core/leakcanary/-leak-canary/-config/leaking-object-finder.md new file mode 100644 index 0000000000..f6b4bb5797 --- /dev/null +++ b/docs/api/leakcanary-android-core/leakcanary/-leak-canary/-config/leaking-object-finder.md @@ -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 + ) +) +``` + diff --git a/docs/api/leakcanary-android-core/leakcanary/-leak-canary/-config/use-experimental-leak-finders.md b/docs/api/leakcanary-android-core/leakcanary/-leak-canary/-config/use-experimental-leak-finders.md index eaf321e0fa..17561184f3 100644 --- a/docs/api/leakcanary-android-core/leakcanary/-leak-canary/-config/use-experimental-leak-finders.md +++ b/docs/api/leakcanary-android-core/leakcanary/-leak-canary/-config/use-experimental-leak-finders.md @@ -2,12 +2,8 @@ # useExperimentalLeakFinders -`val useExperimentalLeakFinders: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) +`val ~~useExperimentalLeakFinders~~: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) +**Deprecated:** This is a no-op, set a custom leakingObjectFinder instead -When true, [objectInspectors](object-inspectors.md) are used to find leaks instead of only checking instances -tracked by [KeyedWeakReference](#). This leads to finding more leaks and shorter leak traces. -However this also means the same leaking instances will be found in every heap dump for a -given process life. - -Defaults to false. +Deprecated: This is a no-op, set a custom [leakingObjectFinder](leaking-object-finder.md) instead. diff --git a/docs/api/leakcanary-object-watcher/leakcanary/-clock/index.md b/docs/api/leakcanary-object-watcher/leakcanary/-clock/index.md index d2ad10d23a..291763d77b 100644 --- a/docs/api/leakcanary-object-watcher/leakcanary/-clock/index.md +++ b/docs/api/leakcanary-object-watcher/leakcanary/-clock/index.md @@ -6,8 +6,16 @@ An interface to abstract the SystemClock.uptimeMillis() Android API in non Android artifacts. +You can create a [Clock](./index.md) from a lambda by calling [invoke](invoke.md). + ### Functions | Name | Summary | |---|---| | [uptimeMillis](uptime-millis.md) | `abstract fun uptimeMillis(): `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)
On Android VMs, this should return android.os.SystemClock.uptimeMillis(). | + +### Companion Object Functions + +| Name | Summary | +|---|---| +| [invoke](invoke.md) | `operator fun invoke(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. | diff --git a/docs/api/leakcanary-object-watcher/leakcanary/-clock/invoke.md b/docs/api/leakcanary-object-watcher/leakcanary/-clock/invoke.md new file mode 100644 index 0000000000..86f6e4ba90 --- /dev/null +++ b/docs/api/leakcanary-object-watcher/leakcanary/-clock/invoke.md @@ -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 { + +} +``` + diff --git a/docs/api/leakcanary-object-watcher/leakcanary/-keyed-weak-reference/-init-.md b/docs/api/leakcanary-object-watcher/leakcanary/-keyed-weak-reference/-init-.md index 66d519b62a..3403dce6c3 100644 --- a/docs/api/leakcanary-object-watcher/leakcanary/-keyed-weak-reference/-init-.md +++ b/docs/api/leakcanary-object-watcher/leakcanary/-keyed-weak-reference/-init-.md @@ -2,7 +2,7 @@ # <init> -`KeyedWeakReference(referent: `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`, key: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, name: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, watchUptimeMillis: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`, referenceQueue: `[`ReferenceQueue`](https://docs.oracle.com/javase/6/docs/api/java/lang/ref/ReferenceQueue.html)`<`[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`>)` +`KeyedWeakReference(referent: `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`, key: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, description: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, watchUptimeMillis: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`, referenceQueue: `[`ReferenceQueue`](https://docs.oracle.com/javase/6/docs/api/java/lang/ref/ReferenceQueue.html)`<`[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`>)` A weak reference used by [ObjectWatcher](../-object-watcher/index.md) to determine which objects become weakly reachable and which don't. [ObjectWatcher](../-object-watcher/index.md) uses [key](key.md) to keep track of [KeyedWeakReference](index.md) instances that diff --git a/docs/api/leakcanary-object-watcher/leakcanary/-keyed-weak-reference/description.md b/docs/api/leakcanary-object-watcher/leakcanary/-keyed-weak-reference/description.md new file mode 100644 index 0000000000..4ed6142e2e --- /dev/null +++ b/docs/api/leakcanary-object-watcher/leakcanary/-keyed-weak-reference/description.md @@ -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) \ No newline at end of file diff --git a/docs/api/leakcanary-object-watcher/leakcanary/-keyed-weak-reference/index.md b/docs/api/leakcanary-object-watcher/leakcanary/-keyed-weak-reference/index.md index d88b86c8cf..cc23662787 100644 --- a/docs/api/leakcanary-object-watcher/leakcanary/-keyed-weak-reference/index.md +++ b/docs/api/leakcanary-object-watcher/leakcanary/-keyed-weak-reference/index.md @@ -15,14 +15,14 @@ before dumping the heap, so that we can later determine how long an object was r | Name | Summary | |---|---| -| [<init>](-init-.md) | `KeyedWeakReference(referent: `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`, key: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, name: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, watchUptimeMillis: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`, referenceQueue: `[`ReferenceQueue`](https://docs.oracle.com/javase/6/docs/api/java/lang/ref/ReferenceQueue.html)`<`[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`>)`
A weak reference used by [ObjectWatcher](../-object-watcher/index.md) to determine which objects become weakly reachable and which don't. [ObjectWatcher](../-object-watcher/index.md) uses [key](key.md) to keep track of [KeyedWeakReference](./index.md) instances that haven't made it into the associated [ReferenceQueue](https://docs.oracle.com/javase/6/docs/api/java/lang/ref/ReferenceQueue.html) yet. | +| [<init>](-init-.md) | `KeyedWeakReference(referent: `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`, key: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, description: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, watchUptimeMillis: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`, referenceQueue: `[`ReferenceQueue`](https://docs.oracle.com/javase/6/docs/api/java/lang/ref/ReferenceQueue.html)`<`[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`>)`
A weak reference used by [ObjectWatcher](../-object-watcher/index.md) to determine which objects become weakly reachable and which don't. [ObjectWatcher](../-object-watcher/index.md) uses [key](key.md) to keep track of [KeyedWeakReference](./index.md) instances that haven't made it into the associated [ReferenceQueue](https://docs.oracle.com/javase/6/docs/api/java/lang/ref/ReferenceQueue.html) yet. | ### Properties | Name | Summary | |---|---| +| [description](description.md) | `val description: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | | [key](key.md) | `val key: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | -| [name](name.md) | `val name: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | | [retainedUptimeMillis](retained-uptime-millis.md) | `var retainedUptimeMillis: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)
Time at which the associated object ([referent](https://docs.oracle.com/javase/6/docs/api/java/lang/ref/WeakReference.html#referent)) was considered retained, or -1 if it hasn't been yet. | | [watchUptimeMillis](watch-uptime-millis.md) | `val watchUptimeMillis: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) | diff --git a/docs/api/leakcanary-object-watcher/leakcanary/-keyed-weak-reference/name.md b/docs/api/leakcanary-object-watcher/leakcanary/-keyed-weak-reference/name.md deleted file mode 100644 index ce100a7960..0000000000 --- a/docs/api/leakcanary-object-watcher/leakcanary/-keyed-weak-reference/name.md +++ /dev/null @@ -1,5 +0,0 @@ -[leakcanary-object-watcher](../../index.md) / [leakcanary](../index.md) / [KeyedWeakReference](index.md) / [name](./name.md) - -# name - -`val name: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) \ No newline at end of file diff --git a/docs/api/leakcanary-object-watcher/leakcanary/-object-watcher/index.md b/docs/api/leakcanary-object-watcher/leakcanary/-object-watcher/index.md index fec9126d71..fdc7465ce3 100644 --- a/docs/api/leakcanary-object-watcher/leakcanary/-object-watcher/index.md +++ b/docs/api/leakcanary-object-watcher/leakcanary/-object-watcher/index.md @@ -37,4 +37,4 @@ to give the GC the opportunity to identify weakly reachable objects. | [clearObjectsWatchedBefore](clear-objects-watched-before.md) | `fun clearObjectsWatchedBefore(heapDumpUptimeMillis: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)
Clears all [KeyedWeakReference](../-keyed-weak-reference/index.md) that were created before [heapDumpUptimeMillis](clear-objects-watched-before.md#leakcanary.ObjectWatcher$clearObjectsWatchedBefore(kotlin.Long)/heapDumpUptimeMillis) (based on [clock](../-clock/uptime-millis.md)) | | [clearWatchedObjects](clear-watched-objects.md) | `fun clearWatchedObjects(): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)
Clears all [KeyedWeakReference](../-keyed-weak-reference/index.md) | | [removeOnObjectRetainedListener](remove-on-object-retained-listener.md) | `fun removeOnObjectRetainedListener(listener: `[`OnObjectRetainedListener`](../-on-object-retained-listener/index.md)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | -| [watch](watch.md) | `fun watch(watchedObject: `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)
Identical to [watch](watch.md) with an empty string reference name.`fun watch(watchedObject: `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`, name: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)
Watches the provided [watchedObject](watch.md#leakcanary.ObjectWatcher$watch(kotlin.Any, kotlin.String)/watchedObject). | +| [watch](watch.md) | `fun ~~watch~~(watchedObject: `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)
Identical to [watch](watch.md) with an empty string reference name.`fun watch(watchedObject: `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`, description: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)
Watches the provided [watchedObject](watch.md#leakcanary.ObjectWatcher$watch(kotlin.Any, kotlin.String)/watchedObject). | diff --git a/docs/api/leakcanary-object-watcher/leakcanary/-object-watcher/watch.md b/docs/api/leakcanary-object-watcher/leakcanary/-object-watcher/watch.md index eb6aee8443..4d38e9cdb3 100644 --- a/docs/api/leakcanary-object-watcher/leakcanary/-object-watcher/watch.md +++ b/docs/api/leakcanary-object-watcher/leakcanary/-object-watcher/watch.md @@ -2,14 +2,15 @@ # watch -`@Synchronized fun watch(watchedObject: `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) +`@Synchronized fun ~~watch~~(watchedObject: `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) +**Deprecated:** Add description parameter explaining why an object is watched to help understand leak traces. Identical to [watch](./watch.md) with an empty string reference name. -`@Synchronized fun watch(watchedObject: `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`, name: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) +`@Synchronized fun watch(watchedObject: `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`, description: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) Watches the provided [watchedObject](watch.md#leakcanary.ObjectWatcher$watch(kotlin.Any, kotlin.String)/watchedObject). ### Parameters -`name` - A logical identifier for the watched object. \ No newline at end of file +`description` - Describes why the object is watched. \ No newline at end of file diff --git a/docs/api/shark-android/alltypes/index.md b/docs/api/shark-android/alltypes/index.md index a5cd189d7f..f51d6191cc 100644 --- a/docs/api/shark-android/alltypes/index.md +++ b/docs/api/shark-android/alltypes/index.md @@ -8,3 +8,4 @@ | [shark.AndroidMetadataExtractor](../shark/-android-metadata-extractor/index.md) | | | [shark.AndroidObjectInspectors](../shark/-android-object-inspectors/index.md) | A set of default [ObjectInspector](#)s that knows about common AOSP and library classes. | | [shark.AndroidReferenceMatchers](../shark/-android-reference-matchers/index.md) | [AndroidReferenceMatchers](../shark/-android-reference-matchers/index.md) values add [ReferenceMatcher](#) instances to a global list via their [add](#) method. A [ReferenceMatcher](#) is either a [IgnoredReferenceMatcher](#) or a [LibraryLeakReferenceMatcher](#). | +| [shark.AndroidResourceIdNames](../shark/-android-resource-id-names/index.md) | | diff --git a/docs/api/shark-android/shark/-android-object-inspectors/app-leaking-object-filters.md b/docs/api/shark-android/shark/-android-object-inspectors/app-leaking-object-filters.md new file mode 100644 index 0000000000..2eb9eb89f2 --- /dev/null +++ b/docs/api/shark-android/shark/-android-object-inspectors/app-leaking-object-filters.md @@ -0,0 +1,8 @@ +[shark-android](../../index.md) / [shark](../index.md) / [AndroidObjectInspectors](index.md) / [appLeakingObjectFilters](./app-leaking-object-filters.md) + +# appLeakingObjectFilters + +`val appLeakingObjectFilters: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`` + +Returns a list of [LeakingObjectFilter](#) suitable for apps. + diff --git a/docs/api/shark-android/shark/-android-object-inspectors/create-leaking-object-filters.md b/docs/api/shark-android/shark/-android-object-inspectors/create-leaking-object-filters.md new file mode 100644 index 0000000000..7287071c23 --- /dev/null +++ b/docs/api/shark-android/shark/-android-object-inspectors/create-leaking-object-filters.md @@ -0,0 +1,8 @@ +[shark-android](../../index.md) / [shark](../index.md) / [AndroidObjectInspectors](index.md) / [createLeakingObjectFilters](./create-leaking-object-filters.md) + +# createLeakingObjectFilters + +`fun createLeakingObjectFilters(inspectors: `[`Set`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`<`[`AndroidObjectInspectors`](index.md)`>): `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`` + +Creates a list of [LeakingObjectFilter](#) based on the passed in [AndroidObjectInspectors](index.md). + diff --git a/docs/api/shark-android/shark/-android-object-inspectors/index.md b/docs/api/shark-android/shark/-android-object-inspectors/index.md index 7a7eb341ea..3b3e644830 100644 --- a/docs/api/shark-android/shark/-android-object-inspectors/index.md +++ b/docs/api/shark-android/shark/-android-object-inspectors/index.md @@ -45,3 +45,10 @@ unless there's a bug and you temporarily want to remove an inspector. | Name | Summary | |---|---| | [appDefaults](app-defaults.md) | `val appDefaults: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`` | +| [appLeakingObjectFilters](app-leaking-object-filters.md) | `val appLeakingObjectFilters: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)``
Returns a list of [LeakingObjectFilter](#) suitable for apps. | + +### Companion Object Functions + +| Name | Summary | +|---|---| +| [createLeakingObjectFilters](create-leaking-object-filters.md) | `fun createLeakingObjectFilters(inspectors: `[`Set`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`<`[`AndroidObjectInspectors`](./index.md)`>): `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)``
Creates a list of [LeakingObjectFilter](#) based on the passed in [AndroidObjectInspectors](./index.md). | diff --git a/docs/api/shark-android/shark/-android-resource-id-names/get.md b/docs/api/shark-android/shark/-android-resource-id-names/get.md new file mode 100644 index 0000000000..990b112910 --- /dev/null +++ b/docs/api/shark-android/shark/-android-resource-id-names/get.md @@ -0,0 +1,5 @@ +[shark-android](../../index.md) / [shark](../index.md) / [AndroidResourceIdNames](index.md) / [get](./get.md) + +# get + +`operator fun get(id: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` \ No newline at end of file diff --git a/docs/api/shark-android/shark/-android-resource-id-names/index.md b/docs/api/shark-android/shark/-android-resource-id-names/index.md new file mode 100644 index 0000000000..563021972d --- /dev/null +++ b/docs/api/shark-android/shark/-android-resource-id-names/index.md @@ -0,0 +1,18 @@ +[shark-android](../../index.md) / [shark](../index.md) / [AndroidResourceIdNames](./index.md) + +# AndroidResourceIdNames + +`class AndroidResourceIdNames` + +### Functions + +| Name | Summary | +|---|---| +| [get](get.md) | `operator fun get(id: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` | + +### Companion Object Functions + +| Name | Summary | +|---|---| +| [readFromHeap](read-from-heap.md) | `fun readFromHeap(graph: HeapGraph): `[`AndroidResourceIdNames`](./index.md)`?` | +| [saveToMemory](save-to-memory.md) | `fun saveToMemory(getResourceTypeName: (`[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`) -> `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?, getResourceEntryName: (`[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`) -> `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | diff --git a/docs/api/shark-android/shark/-android-resource-id-names/read-from-heap.md b/docs/api/shark-android/shark/-android-resource-id-names/read-from-heap.md new file mode 100644 index 0000000000..ef67cdf802 --- /dev/null +++ b/docs/api/shark-android/shark/-android-resource-id-names/read-from-heap.md @@ -0,0 +1,5 @@ +[shark-android](../../index.md) / [shark](../index.md) / [AndroidResourceIdNames](index.md) / [readFromHeap](./read-from-heap.md) + +# readFromHeap + +`fun readFromHeap(graph: HeapGraph): `[`AndroidResourceIdNames`](index.md)`?` \ No newline at end of file diff --git a/docs/api/shark-android/shark/-android-resource-id-names/save-to-memory.md b/docs/api/shark-android/shark/-android-resource-id-names/save-to-memory.md new file mode 100644 index 0000000000..dd01cd99ca --- /dev/null +++ b/docs/api/shark-android/shark/-android-resource-id-names/save-to-memory.md @@ -0,0 +1,15 @@ +[shark-android](../../index.md) / [shark](../index.md) / [AndroidResourceIdNames](index.md) / [saveToMemory](./save-to-memory.md) + +# saveToMemory + +`@Synchronized fun saveToMemory(getResourceTypeName: (`[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`) -> `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?, getResourceEntryName: (`[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`) -> `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) + +### Parameters + +`getResourceTypeName` - a function that delegates to Android +Resources.getResourceTypeName but returns null when the name isn't found instead of +throwing an exception. + +`getResourceEntryName` - a function that delegates to Android +Resources.getResourceEntryName but returns null when the name isn't found instead of +throwing an exception. \ No newline at end of file diff --git a/docs/api/shark-android/shark/index.md b/docs/api/shark-android/shark/index.md index b4a8021c5f..d2d62b3e9c 100644 --- a/docs/api/shark-android/shark/index.md +++ b/docs/api/shark-android/shark/index.md @@ -10,9 +10,4 @@ | [AndroidMetadataExtractor](-android-metadata-extractor/index.md) | `object AndroidMetadataExtractor : MetadataExtractor` | | [AndroidObjectInspectors](-android-object-inspectors/index.md) | `enum class AndroidObjectInspectors : ObjectInspector`
A set of default [ObjectInspector](#)s that knows about common AOSP and library classes. | | [AndroidReferenceMatchers](-android-reference-matchers/index.md) | `enum class AndroidReferenceMatchers`
[AndroidReferenceMatchers](-android-reference-matchers/index.md) values add [ReferenceMatcher](#) instances to a global list via their [add](#) method. A [ReferenceMatcher](#) is either a [IgnoredReferenceMatcher](#) or a [LibraryLeakReferenceMatcher](#). | - -### Functions - -| Name | Summary | -|---|---| -| [unwrapActivityContext](unwrap-activity-context.md) | `fun HeapInstance.unwrapActivityContext(): HeapInstance?`
Recursively unwraps `this` [HeapInstance](#) as a ContextWrapper until an Activity is found in which case it is returned. Returns null if no activity was found. | +| [AndroidResourceIdNames](-android-resource-id-names/index.md) | `class AndroidResourceIdNames` | diff --git a/docs/api/shark-android/shark/unwrap-activity-context.md b/docs/api/shark-android/shark/unwrap-activity-context.md deleted file mode 100644 index c64b3db01b..0000000000 --- a/docs/api/shark-android/shark/unwrap-activity-context.md +++ /dev/null @@ -1,9 +0,0 @@ -[shark-android](../index.md) / [shark](index.md) / [unwrapActivityContext](./unwrap-activity-context.md) - -# unwrapActivityContext - -`fun HeapInstance.unwrapActivityContext(): HeapInstance?` - -Recursively unwraps `this` [HeapInstance](#) as a ContextWrapper until an Activity is found in which case it is -returned. Returns null if no activity was found. - diff --git a/docs/api/shark-graph/shark/-heap-graph/index.md b/docs/api/shark-graph/shark/-heap-graph/index.md index 3575de496e..53e38d1c37 100644 --- a/docs/api/shark-graph/shark/-heap-graph/index.md +++ b/docs/api/shark-graph/shark/-heap-graph/index.md @@ -15,7 +15,9 @@ Enables navigation through the heap graph of objects. | [gcRoots](gc-roots.md) | `abstract val gcRoots: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)``
All GC roots which type matches types known to this heap graph and which point to non null references. You can retrieve the object that a GC Root points to by calling [findObjectById](find-object-by-id.md) with [GcRoot.id](#), however you need to first check that [objectExists](object-exists.md) returns true because GC roots can point to objects that don't exist in the heap dump. | | [identifierByteSize](identifier-byte-size.md) | `abstract val identifierByteSize: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | | [instances](instances.md) | `abstract val instances: `[`Sequence`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/-sequence/index.html)`<`[`HeapObject.HeapInstance`](../-heap-object/-heap-instance/index.md)`>`
Sequence of all instances in the heap dump. | +| [objectArrays](object-arrays.md) | `abstract val objectArrays: `[`Sequence`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/-sequence/index.html)`<`[`HeapObject.HeapObjectArray`](../-heap-object/-heap-object-array/index.md)`>`
Sequence of all object arrays in the heap dump. | | [objects](objects.md) | `abstract val objects: `[`Sequence`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/-sequence/index.html)`<`[`HeapObject`](../-heap-object/index.md)`>`
Sequence of all objects in the heap dump. | +| [primitiveArrays](primitive-arrays.md) | `abstract val primitiveArrays: `[`Sequence`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/-sequence/index.html)`<`[`HeapObject.HeapPrimitiveArray`](../-heap-object/-heap-primitive-array/index.md)`>`
Sequence of all primitive arrays in the heap dump. | ### Functions diff --git a/docs/api/shark-graph/shark/-heap-graph/object-arrays.md b/docs/api/shark-graph/shark/-heap-graph/object-arrays.md new file mode 100644 index 0000000000..608eee9b56 --- /dev/null +++ b/docs/api/shark-graph/shark/-heap-graph/object-arrays.md @@ -0,0 +1,10 @@ +[shark-graph](../../index.md) / [shark](../index.md) / [HeapGraph](index.md) / [objectArrays](./object-arrays.md) + +# objectArrays + +`abstract val objectArrays: `[`Sequence`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/-sequence/index.html)`<`[`HeapObject.HeapObjectArray`](../-heap-object/-heap-object-array/index.md)`>` + +Sequence of all object arrays in the heap dump. + +This sequence does not trigger any IO reads. + diff --git a/docs/api/shark-graph/shark/-heap-graph/primitive-arrays.md b/docs/api/shark-graph/shark/-heap-graph/primitive-arrays.md new file mode 100644 index 0000000000..a0e5928ffe --- /dev/null +++ b/docs/api/shark-graph/shark/-heap-graph/primitive-arrays.md @@ -0,0 +1,10 @@ +[shark-graph](../../index.md) / [shark](../index.md) / [HeapGraph](index.md) / [primitiveArrays](./primitive-arrays.md) + +# primitiveArrays + +`abstract val primitiveArrays: `[`Sequence`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/-sequence/index.html)`<`[`HeapObject.HeapPrimitiveArray`](../-heap-object/-heap-primitive-array/index.md)`>` + +Sequence of all primitive arrays in the heap dump. + +This sequence does not trigger any IO reads. + diff --git a/docs/api/shark-graph/shark/-heap-object/-heap-class/index.md b/docs/api/shark-graph/shark/-heap-object/-heap-class/index.md index f5c3def218..f7eea31579 100644 --- a/docs/api/shark-graph/shark/-heap-object/-heap-class/index.md +++ b/docs/api/shark-graph/shark/-heap-object/-heap-class/index.md @@ -15,8 +15,13 @@ A class in the heap dump. | [graph](graph.md) | `val graph: `[`HeapGraph`](../../-heap-graph/index.md)
The graph of objects in the heap, which you can use to navigate the heap. | | [instanceByteSize](instance-byte-size.md) | `val instanceByteSize: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)
The total byte size of fields for instances of this class, as registered in the class dump. This includes the size of fields from superclasses. | | [instances](instances.md) | `val instances: `[`Sequence`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/-sequence/index.html)`<`[`HeapObject.HeapInstance`](../-heap-instance/index.md)`>`
All instances of this class, including instances of subclasses of this class. | +| [isArrayClass](is-array-class.md) | `val isArrayClass: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)
Returns true if this class is an array class, and false otherwise. | +| [isObjectArrayClass](is-object-array-class.md) | `val isObjectArrayClass: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | +| [isPrimitiveArrayClass](is-primitive-array-class.md) | `val isPrimitiveArrayClass: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | | [name](name.md) | `val name: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
The name of this class, identical to [Class.getName](https://docs.oracle.com/javase/6/docs/api/java/lang/Class.html#getName()). | +| [objectArrayInstances](object-array-instances.md) | `val objectArrayInstances: `[`Sequence`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/-sequence/index.html)`<`[`HeapObject.HeapObjectArray`](../-heap-object-array/index.md)`>` | | [objectId](object-id.md) | `val objectId: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)
The heap identifier of this object. | +| [primitiveArrayInstances](primitive-array-instances.md) | `val primitiveArrayInstances: `[`Sequence`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/-sequence/index.html)`<`[`HeapObject.HeapPrimitiveArray`](../-heap-primitive-array/index.md)`>` | | [simpleName](simple-name.md) | `val simpleName: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
Returns [name](name.md) stripped of any string content before the last period (included). | | [subclasses](subclasses.md) | `val subclasses: `[`Sequence`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/-sequence/index.html)`<`[`HeapObject.HeapClass`](./index.md)`>`
All the subclasses (direct and indirect) of this class, in the order they were recorded in the heap dump. | | [superclass](superclass.md) | `val superclass: `[`HeapObject.HeapClass`](./index.md)`?`
The [HeapClass](./index.md) representing the superclass of this [HeapClass](./index.md). If this [HeapClass](./index.md) represents either the [Object](https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html) class or a primitive type, then null is returned. If this [HeapClass](./index.md) represents an array class then the [HeapClass](./index.md) object representing the [Object](https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html) class is returned. | diff --git a/docs/api/shark-graph/shark/-heap-object/-heap-class/is-array-class.md b/docs/api/shark-graph/shark/-heap-object/-heap-class/is-array-class.md new file mode 100644 index 0000000000..c38738add0 --- /dev/null +++ b/docs/api/shark-graph/shark/-heap-object/-heap-class/is-array-class.md @@ -0,0 +1,8 @@ +[shark-graph](../../../index.md) / [shark](../../index.md) / [HeapObject](../index.md) / [HeapClass](index.md) / [isArrayClass](./is-array-class.md) + +# isArrayClass + +`val isArrayClass: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) + +Returns true if this class is an array class, and false otherwise. + diff --git a/docs/api/shark-graph/shark/-heap-object/-heap-class/is-object-array-class.md b/docs/api/shark-graph/shark/-heap-object/-heap-class/is-object-array-class.md new file mode 100644 index 0000000000..925b54d38d --- /dev/null +++ b/docs/api/shark-graph/shark/-heap-object/-heap-class/is-object-array-class.md @@ -0,0 +1,5 @@ +[shark-graph](../../../index.md) / [shark](../../index.md) / [HeapObject](../index.md) / [HeapClass](index.md) / [isObjectArrayClass](./is-object-array-class.md) + +# isObjectArrayClass + +`val isObjectArrayClass: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) \ No newline at end of file diff --git a/docs/api/shark-graph/shark/-heap-object/-heap-class/is-primitive-array-class.md b/docs/api/shark-graph/shark/-heap-object/-heap-class/is-primitive-array-class.md new file mode 100644 index 0000000000..ba444cf251 --- /dev/null +++ b/docs/api/shark-graph/shark/-heap-object/-heap-class/is-primitive-array-class.md @@ -0,0 +1,5 @@ +[shark-graph](../../../index.md) / [shark](../../index.md) / [HeapObject](../index.md) / [HeapClass](index.md) / [isPrimitiveArrayClass](./is-primitive-array-class.md) + +# isPrimitiveArrayClass + +`val isPrimitiveArrayClass: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) \ No newline at end of file diff --git a/docs/api/shark-graph/shark/-heap-object/-heap-class/object-array-instances.md b/docs/api/shark-graph/shark/-heap-object/-heap-class/object-array-instances.md new file mode 100644 index 0000000000..51329059b4 --- /dev/null +++ b/docs/api/shark-graph/shark/-heap-object/-heap-class/object-array-instances.md @@ -0,0 +1,5 @@ +[shark-graph](../../../index.md) / [shark](../../index.md) / [HeapObject](../index.md) / [HeapClass](index.md) / [objectArrayInstances](./object-array-instances.md) + +# objectArrayInstances + +`val objectArrayInstances: `[`Sequence`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/-sequence/index.html)`<`[`HeapObject.HeapObjectArray`](../-heap-object-array/index.md)`>` \ No newline at end of file diff --git a/docs/api/shark-graph/shark/-heap-object/-heap-class/primitive-array-instances.md b/docs/api/shark-graph/shark/-heap-object/-heap-class/primitive-array-instances.md new file mode 100644 index 0000000000..c1dbccced8 --- /dev/null +++ b/docs/api/shark-graph/shark/-heap-object/-heap-class/primitive-array-instances.md @@ -0,0 +1,5 @@ +[shark-graph](../../../index.md) / [shark](../../index.md) / [HeapObject](../index.md) / [HeapClass](index.md) / [primitiveArrayInstances](./primitive-array-instances.md) + +# primitiveArrayInstances + +`val primitiveArrayInstances: `[`Sequence`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/-sequence/index.html)`<`[`HeapObject.HeapPrimitiveArray`](../-heap-primitive-array/index.md)`>` \ No newline at end of file diff --git a/docs/api/shark-graph/shark/-heap-object/-heap-primitive-array/array-class.md b/docs/api/shark-graph/shark/-heap-object/-heap-primitive-array/array-class.md new file mode 100644 index 0000000000..ffbf70b375 --- /dev/null +++ b/docs/api/shark-graph/shark/-heap-object/-heap-primitive-array/array-class.md @@ -0,0 +1,8 @@ +[shark-graph](../../../index.md) / [shark](../../index.md) / [HeapObject](../index.md) / [HeapPrimitiveArray](index.md) / [arrayClass](./array-class.md) + +# arrayClass + +`val arrayClass: `[`HeapObject.HeapClass`](../-heap-class/index.md) + +The class of this array. + diff --git a/docs/api/shark-graph/shark/-heap-object/-heap-primitive-array/index.md b/docs/api/shark-graph/shark/-heap-object/-heap-primitive-array/index.md index 734f6f50de..58395725a5 100644 --- a/docs/api/shark-graph/shark/-heap-object/-heap-primitive-array/index.md +++ b/docs/api/shark-graph/shark/-heap-object/-heap-primitive-array/index.md @@ -10,6 +10,7 @@ A primitive array in the heap dump. | Name | Summary | |---|---| +| [arrayClass](array-class.md) | `val arrayClass: `[`HeapObject.HeapClass`](../-heap-class/index.md)
The class of this array. | | [arrayClassName](array-class-name.md) | `val arrayClassName: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
The name of the class of this array, identical to [Class.getName](https://docs.oracle.com/javase/6/docs/api/java/lang/Class.html#getName()). | | [graph](graph.md) | `val graph: `[`HeapGraph`](../../-heap-graph/index.md)
The graph of objects in the heap, which you can use to navigate the heap. | | [objectId](object-id.md) | `val objectId: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)
The heap identifier of this object. | diff --git a/docs/api/shark-graph/shark/-hprof-heap-graph/index-hprof.md b/docs/api/shark-graph/shark/-hprof-heap-graph/index-hprof.md index e34684b0bb..e4773db219 100644 --- a/docs/api/shark-graph/shark/-hprof-heap-graph/index-hprof.md +++ b/docs/api/shark-graph/shark/-hprof-heap-graph/index-hprof.md @@ -2,4 +2,30 @@ # indexHprof -`fun indexHprof(hprof: Hprof, proguardMapping: `[`ProguardMapping`](../-proguard-mapping/index.md)`? = null): `[`HeapGraph`](../-heap-graph/index.md) \ No newline at end of file +`fun indexHprof(hprof: Hprof, proguardMapping: `[`ProguardMapping`](../-proguard-mapping/index.md)`? = null, indexedGcRootTypes: `[`Set`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`<`[`KClass`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.reflect/-k-class/index.html)`> = setOf( + JniGlobal::class, + JavaFrame::class, + JniLocal::class, + MonitorUsed::class, + NativeStack::class, + StickyClass::class, + ThreadBlock::class, + // ThreadObject points to threads, which we need to find the thread that a JavaLocalPattern + // belongs to + ThreadObject::class, + JniMonitor::class + /* + Not included here: + + VmInternal: Ignoring because we've got 150K of it, but is this the right thing + to do? What's VmInternal exactly? History does not go further than + https://android.googlesource.com/platform/dalvik2/+/refs/heads/master/hit/src/com/android/hit/HprofParser.java#77 + We should log to figure out what objects VmInternal points to. + + ReferenceCleanup: We used to keep it, but the name doesn't seem like it should create a leak. + + Unknown: it's unknown, should we care? + + We definitely don't care about those for leak finding: InternedString, Finalizing, Debugger, Unreachable + */ + )): `[`HeapGraph`](../-heap-graph/index.md) \ No newline at end of file diff --git a/docs/api/shark-graph/shark/-hprof-heap-graph/index.md b/docs/api/shark-graph/shark/-hprof-heap-graph/index.md index fa67824737..357dca9fe9 100644 --- a/docs/api/shark-graph/shark/-hprof-heap-graph/index.md +++ b/docs/api/shark-graph/shark/-hprof-heap-graph/index.md @@ -15,7 +15,9 @@ A [HeapGraph](../-heap-graph/index.md) that reads from an indexed [Hprof](#). Cr | [gcRoots](gc-roots.md) | `val gcRoots: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)``
All GC roots which type matches types known to this heap graph and which point to non null references. You can retrieve the object that a GC Root points to by calling [findObjectById](../-heap-graph/find-object-by-id.md) with [GcRoot.id](#), however you need to first check that [objectExists](../-heap-graph/object-exists.md) returns true because GC roots can point to objects that don't exist in the heap dump. | | [identifierByteSize](identifier-byte-size.md) | `val identifierByteSize: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | | [instances](instances.md) | `val instances: `[`Sequence`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/-sequence/index.html)`<`[`HeapObject.HeapInstance`](../-heap-object/-heap-instance/index.md)`>`
Sequence of all instances in the heap dump. | +| [objectArrays](object-arrays.md) | `val objectArrays: `[`Sequence`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/-sequence/index.html)`<`[`HeapObject.HeapObjectArray`](../-heap-object/-heap-object-array/index.md)`>`
Sequence of all object arrays in the heap dump. | | [objects](objects.md) | `val objects: `[`Sequence`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/-sequence/index.html)`<`[`HeapObject`](../-heap-object/index.md)`>`
Sequence of all objects in the heap dump. | +| [primitiveArrays](primitive-arrays.md) | `val primitiveArrays: `[`Sequence`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/-sequence/index.html)`<`[`HeapObject.HeapPrimitiveArray`](../-heap-object/-heap-primitive-array/index.md)`>`
Sequence of all primitive arrays in the heap dump. | ### Functions @@ -30,4 +32,30 @@ A [HeapGraph](../-heap-graph/index.md) that reads from an indexed [Hprof](#). Cr | Name | Summary | |---|---| -| [indexHprof](index-hprof.md) | `fun indexHprof(hprof: Hprof, proguardMapping: `[`ProguardMapping`](../-proguard-mapping/index.md)`? = null): `[`HeapGraph`](../-heap-graph/index.md) | +| [indexHprof](index-hprof.md) | `fun indexHprof(hprof: Hprof, proguardMapping: `[`ProguardMapping`](../-proguard-mapping/index.md)`? = null, indexedGcRootTypes: `[`Set`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`<`[`KClass`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.reflect/-k-class/index.html)`> = setOf( + JniGlobal::class, + JavaFrame::class, + JniLocal::class, + MonitorUsed::class, + NativeStack::class, + StickyClass::class, + ThreadBlock::class, + // ThreadObject points to threads, which we need to find the thread that a JavaLocalPattern + // belongs to + ThreadObject::class, + JniMonitor::class + /* + Not included here: + + VmInternal: Ignoring because we've got 150K of it, but is this the right thing + to do? What's VmInternal exactly? History does not go further than + https://android.googlesource.com/platform/dalvik2/+/refs/heads/master/hit/src/com/android/hit/HprofParser.java#77 + We should log to figure out what objects VmInternal points to. + + ReferenceCleanup: We used to keep it, but the name doesn't seem like it should create a leak. + + Unknown: it's unknown, should we care? + + We definitely don't care about those for leak finding: InternedString, Finalizing, Debugger, Unreachable + */ + )): `[`HeapGraph`](../-heap-graph/index.md) | diff --git a/docs/api/shark-graph/shark/-hprof-heap-graph/object-arrays.md b/docs/api/shark-graph/shark/-hprof-heap-graph/object-arrays.md new file mode 100644 index 0000000000..f09d0f9a84 --- /dev/null +++ b/docs/api/shark-graph/shark/-hprof-heap-graph/object-arrays.md @@ -0,0 +1,12 @@ +[shark-graph](../../index.md) / [shark](../index.md) / [HprofHeapGraph](index.md) / [objectArrays](./object-arrays.md) + +# objectArrays + +`val objectArrays: `[`Sequence`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/-sequence/index.html)`<`[`HeapObject.HeapObjectArray`](../-heap-object/-heap-object-array/index.md)`>` + +Overrides [HeapGraph.objectArrays](../-heap-graph/object-arrays.md) + +Sequence of all object arrays in the heap dump. + +This sequence does not trigger any IO reads. + diff --git a/docs/api/shark-graph/shark/-hprof-heap-graph/primitive-arrays.md b/docs/api/shark-graph/shark/-hprof-heap-graph/primitive-arrays.md new file mode 100644 index 0000000000..94ff694be8 --- /dev/null +++ b/docs/api/shark-graph/shark/-hprof-heap-graph/primitive-arrays.md @@ -0,0 +1,12 @@ +[shark-graph](../../index.md) / [shark](../index.md) / [HprofHeapGraph](index.md) / [primitiveArrays](./primitive-arrays.md) + +# primitiveArrays + +`val primitiveArrays: `[`Sequence`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/-sequence/index.html)`<`[`HeapObject.HeapPrimitiveArray`](../-heap-object/-heap-primitive-array/index.md)`>` + +Overrides [HeapGraph.primitiveArrays](../-heap-graph/primitive-arrays.md) + +Sequence of all primitive arrays in the heap dump. + +This sequence does not trigger any IO reads. + diff --git a/docs/api/shark/alltypes/index.md b/docs/api/shark/alltypes/index.md index 5c0d244a5b..1e722349ee 100644 --- a/docs/api/shark/alltypes/index.md +++ b/docs/api/shark/alltypes/index.md @@ -6,17 +6,19 @@ |---|---| | [shark.ApplicationLeak](../shark/-application-leak/index.md) | A leak found by [HeapAnalyzer](../shark/-heap-analyzer/index.md) in your application. | | [shark.AppSingletonInspector](../shark/-app-singleton-inspector/index.md) | Inspector that automatically marks instances of the provided class names as not leaking because they're app wide singletons. | +| [shark.FilteringLeakingObjectFinder](../shark/-filtering-leaking-object-finder/index.md) | Finds the objects that are leaking by scanning all objects in the heap dump and delegating the decision to a list of [FilteringLeakingObjectFinder.LeakingObjectFilter](../shark/-filtering-leaking-object-finder/-leaking-object-filter/index.md) | | [shark.HeapAnalysis](../shark/-heap-analysis/index.md) | The result of an analysis performed by [HeapAnalyzer](../shark/-heap-analyzer/index.md), either a [HeapAnalysisSuccess](../shark/-heap-analysis-success/index.md) or a [HeapAnalysisFailure](../shark/-heap-analysis-failure/index.md). This class is serializable however there are no guarantees of forward compatibility. | | [shark.HeapAnalysisException](../shark/-heap-analysis-exception/index.md) | | | [shark.HeapAnalysisFailure](../shark/-heap-analysis-failure/index.md) | The analysis performed by [HeapAnalyzer](../shark/-heap-analyzer/index.md) did not complete successfully. | | [shark.HeapAnalysisSuccess](../shark/-heap-analysis-success/index.md) | The result of a successful heap analysis performed by [HeapAnalyzer](../shark/-heap-analyzer/index.md). | | [shark.HeapAnalyzer](../shark/-heap-analyzer/index.md) | Analyzes heap dumps to look for leaks. | | [shark.IgnoredReferenceMatcher](../shark/-ignored-reference-matcher/index.md) | [IgnoredReferenceMatcher](../shark/-ignored-reference-matcher/index.md) should be used to match references that cannot ever create leaks. The shortest path finder will never go through matching references. | +| [shark.KeyedWeakReferenceFinder](../shark/-keyed-weak-reference-finder/index.md) | Finds all objects tracked by a KeyedWeakReference, ie all objects that were passed to ObjectWatcher.watch. | | [shark.Leak](../shark/-leak/index.md) | A leak found by [HeapAnalyzer](../shark/-heap-analyzer/index.md), either an [ApplicationLeak](../shark/-application-leak/index.md) or a [LibraryLeak](../shark/-library-leak/index.md). | -| [shark.LeakNodeStatus](../shark/-leak-node-status/index.md) | | -| [shark.LeakReference](../shark/-leak-reference/index.md) | A single field in a [LeakTraceElement](../shark/-leak-trace-element/index.md). | -| [shark.LeakTrace](../shark/-leak-trace/index.md) | A chain of references that constitute the shortest strong reference path from a GC root to the leaking object. Fixing the leak usually means breaking one of the references in that chain. | -| [shark.LeakTraceElement](../shark/-leak-trace-element/index.md) | | +| [shark.LeakingObjectFinder](../shark/-leaking-object-finder/index.md) | Finds the objects that are leaking, for which Shark will compute leak traces. | +| [shark.LeakTrace](../shark/-leak-trace/index.md) | The best strong reference path from a GC root to the leaking object. "Best" here means the shortest prioritized path. A large number of distinct paths can generally be found leading to a leaking object. Shark prioritizes paths that don't go through known [LibraryLeakReferenceMatcher](../shark/-library-leak-reference-matcher/index.md) (because those are known to create leaks so it's more interesting to find other paths causing leaks), then it prioritize paths that don't go through java local gc roots (because those are harder to reason about). Taking those priorities into account, finding the shortest path means there are less [LeakTraceReference](../shark/-leak-trace-reference/index.md) that can be suspected to cause the leak. | +| [shark.LeakTraceObject](../shark/-leak-trace-object/index.md) | | +| [shark.LeakTraceReference](../shark/-leak-trace-reference/index.md) | A [LeakTraceReference](../shark/-leak-trace-reference/index.md) represents and origin [LeakTraceObject](../shark/-leak-trace-object/index.md) and either a reference from that object to the [LeakTraceObject](../shark/-leak-trace-object/index.md) in the next [LeakTraceReference](../shark/-leak-trace-reference/index.md) in [LeakTrace.referencePath](../shark/-leak-trace/reference-path.md), or to [LeakTrace.leakingObject](../shark/-leak-trace/leaking-object.md) if this is the last [LeakTraceReference](../shark/-leak-trace-reference/index.md) in [LeakTrace.referencePath](../shark/-leak-trace/reference-path.md). | | [shark.LibraryLeak](../shark/-library-leak/index.md) | A leak found by [HeapAnalyzer](../shark/-heap-analyzer/index.md), where the only path to the leaking object required going through a reference matched by [pattern](../shark/-library-leak/pattern.md), as provided to a [LibraryLeakReferenceMatcher](../shark/-library-leak-reference-matcher/index.md) instance. This is a known leak in library code that is beyond your control. | | [shark.LibraryLeakReferenceMatcher](../shark/-library-leak-reference-matcher/index.md) | [LibraryLeakReferenceMatcher](../shark/-library-leak-reference-matcher/index.md) should be used to match references in library code that are known to create leaks and are beyond your control. The shortest path finder will only go through matching references after it has exhausted references that don't match, prioritizing finding an application leak over a known library leak. Library leaks will be reported as [LibraryLeak](../shark/-library-leak/index.md) instead of [ApplicationLeak](../shark/-application-leak/index.md). | | [shark.MetadataExtractor](../shark/-metadata-extractor/index.md) | Extracts metadata from a hprof to be reported in [HeapAnalysisSuccess.metadata](../shark/-heap-analysis-success/metadata.md). | diff --git a/docs/api/shark/shark/-application-leak/-init-.md b/docs/api/shark/shark/-application-leak/-init-.md index 1656da8642..4c6825b497 100644 --- a/docs/api/shark/shark/-application-leak/-init-.md +++ b/docs/api/shark/shark/-application-leak/-init-.md @@ -2,7 +2,7 @@ # <init> -`ApplicationLeak(className: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, leakTrace: `[`LeakTrace`](../-leak-trace/index.md)`, retainedHeapByteSize: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?)` +`ApplicationLeak(leakTraces: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`LeakTrace`](../-leak-trace/index.md)`>)` A leak found by [HeapAnalyzer](../-heap-analyzer/index.md) in your application. diff --git a/docs/api/shark/shark/-application-leak/class-name.md b/docs/api/shark/shark/-application-leak/class-name.md deleted file mode 100644 index e2199ea000..0000000000 --- a/docs/api/shark/shark/-application-leak/class-name.md +++ /dev/null @@ -1,11 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [ApplicationLeak](index.md) / [className](./class-name.md) - -# className - -`val className: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) - -Overrides [Leak.className](../-leak/class-name.md) - -Class name of the leaking object. -The class name format is the same as what would be returned by [Class.getName](https://docs.oracle.com/javase/6/docs/api/java/lang/Class.html#getName()). - diff --git a/docs/api/shark/shark/-application-leak/create-group-hash.md b/docs/api/shark/shark/-application-leak/create-group-hash.md deleted file mode 100644 index 247854d240..0000000000 --- a/docs/api/shark/shark/-application-leak/create-group-hash.md +++ /dev/null @@ -1,8 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [ApplicationLeak](index.md) / [createGroupHash](./create-group-hash.md) - -# createGroupHash - -`protected fun createGroupHash(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) - -Overrides [Leak.createGroupHash](../-leak/create-group-hash.md) - diff --git a/docs/api/shark/shark/-application-leak/index.md b/docs/api/shark/shark/-application-leak/index.md index aac2a68f38..936fae0bd0 100644 --- a/docs/api/shark/shark/-application-leak/index.md +++ b/docs/api/shark/shark/-application-leak/index.md @@ -10,26 +10,24 @@ A leak found by [HeapAnalyzer](../-heap-analyzer/index.md) in your application. | Name | Summary | |---|---| -| [<init>](-init-.md) | `ApplicationLeak(className: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, leakTrace: `[`LeakTrace`](../-leak-trace/index.md)`, retainedHeapByteSize: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?)`
A leak found by [HeapAnalyzer](../-heap-analyzer/index.md) in your application. | +| [<init>](-init-.md) | `ApplicationLeak(leakTraces: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`LeakTrace`](../-leak-trace/index.md)`>)`
A leak found by [HeapAnalyzer](../-heap-analyzer/index.md) in your application. | ### Properties | Name | Summary | |---|---| -| [className](class-name.md) | `val className: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
Class name of the leaking object. The class name format is the same as what would be returned by [Class.getName](https://docs.oracle.com/javase/6/docs/api/java/lang/Class.html#getName()). | -| [leakTrace](leak-trace.md) | `val leakTrace: `[`LeakTrace`](../-leak-trace/index.md)
Shortest path from GC roots to the leaking object. | -| [retainedHeapByteSize](retained-heap-byte-size.md) | `val retainedHeapByteSize: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?`
The number of bytes which would be freed if all references to the leaking object were released. Null if the retained heap size was not computed. | +| [leakTraces](leak-traces.md) | `val leakTraces: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`LeakTrace`](../-leak-trace/index.md)`>`
Group of leak traces which share the same leak signature. | +| [shortDescription](short-description.md) | `val shortDescription: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | +| [signature](signature.md) | `val signature: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
A unique SHA1 hash that represents this group of leak traces. | ### Inherited Properties | Name | Summary | |---|---| -| [classSimpleName](../-leak/class-simple-name.md) | `val classSimpleName: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
Returns [className](../-leak/class-name.md) stripped of any string content before the last period (included). | -| [groupHash](../-leak/group-hash.md) | `val groupHash: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
A unique SHA1 hash that represents this group of leaks. | +| [totalRetainedHeapByteSize](../-leak/total-retained-heap-byte-size.md) | `val totalRetainedHeapByteSize: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?`
Sum of [LeakTrace.retainedHeapByteSize](../-leak-trace/retained-heap-byte-size.md) for all elements in [leakTraces](../-leak/leak-traces.md). Null if the retained heap size was not computed. | ### Functions | Name | Summary | |---|---| -| [createGroupHash](create-group-hash.md) | `fun createGroupHash(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | | [toString](to-string.md) | `fun toString(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | diff --git a/docs/api/shark/shark/-application-leak/leak-trace.md b/docs/api/shark/shark/-application-leak/leak-trace.md deleted file mode 100644 index 26dc4aa569..0000000000 --- a/docs/api/shark/shark/-application-leak/leak-trace.md +++ /dev/null @@ -1,10 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [ApplicationLeak](index.md) / [leakTrace](./leak-trace.md) - -# leakTrace - -`val leakTrace: `[`LeakTrace`](../-leak-trace/index.md) - -Overrides [Leak.leakTrace](../-leak/leak-trace.md) - -Shortest path from GC roots to the leaking object. - diff --git a/docs/api/shark/shark/-application-leak/leak-traces.md b/docs/api/shark/shark/-application-leak/leak-traces.md new file mode 100644 index 0000000000..efee529218 --- /dev/null +++ b/docs/api/shark/shark/-application-leak/leak-traces.md @@ -0,0 +1,10 @@ +[shark](../../index.md) / [shark](../index.md) / [ApplicationLeak](index.md) / [leakTraces](./leak-traces.md) + +# leakTraces + +`val leakTraces: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`LeakTrace`](../-leak-trace/index.md)`>` + +Overrides [Leak.leakTraces](../-leak/leak-traces.md) + +Group of leak traces which share the same leak signature. + diff --git a/docs/api/shark/shark/-application-leak/retained-heap-byte-size.md b/docs/api/shark/shark/-application-leak/retained-heap-byte-size.md deleted file mode 100644 index caa36392c1..0000000000 --- a/docs/api/shark/shark/-application-leak/retained-heap-byte-size.md +++ /dev/null @@ -1,11 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [ApplicationLeak](index.md) / [retainedHeapByteSize](./retained-heap-byte-size.md) - -# retainedHeapByteSize - -`val retainedHeapByteSize: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?` - -Overrides [Leak.retainedHeapByteSize](../-leak/retained-heap-byte-size.md) - -The number of bytes which would be freed if all references to the leaking object were -released. Null if the retained heap size was not computed. - diff --git a/docs/api/shark/shark/-application-leak/short-description.md b/docs/api/shark/shark/-application-leak/short-description.md new file mode 100644 index 0000000000..763565494d --- /dev/null +++ b/docs/api/shark/shark/-application-leak/short-description.md @@ -0,0 +1,8 @@ +[shark](../../index.md) / [shark](../index.md) / [ApplicationLeak](index.md) / [shortDescription](./short-description.md) + +# shortDescription + +`val shortDescription: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) + +Overrides [Leak.shortDescription](../-leak/short-description.md) + diff --git a/docs/api/shark/shark/-application-leak/signature.md b/docs/api/shark/shark/-application-leak/signature.md new file mode 100644 index 0000000000..af222650e5 --- /dev/null +++ b/docs/api/shark/shark/-application-leak/signature.md @@ -0,0 +1,13 @@ +[shark](../../index.md) / [shark](../index.md) / [ApplicationLeak](index.md) / [signature](./signature.md) + +# signature + +`val signature: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) + +Overrides [Leak.signature](../-leak/signature.md) + +A unique SHA1 hash that represents this group of leak traces. + +For [ApplicationLeak](index.md) this is based on [LeakTrace.signature](../-leak-trace/signature.md) and for [LibraryLeak](../-library-leak/index.md) this is +based on [LibraryLeak.pattern](../-library-leak/pattern.md). + diff --git a/docs/api/shark/shark/-filtering-leaking-object-finder/-init-.md b/docs/api/shark/shark/-filtering-leaking-object-finder/-init-.md new file mode 100644 index 0000000000..a6e0de6111 --- /dev/null +++ b/docs/api/shark/shark/-filtering-leaking-object-finder/-init-.md @@ -0,0 +1,9 @@ +[shark](../../index.md) / [shark](../index.md) / [FilteringLeakingObjectFinder](index.md) / [<init>](./-init-.md) + +# <init> + +`FilteringLeakingObjectFinder(filters: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`FilteringLeakingObjectFinder.LeakingObjectFilter`](-leaking-object-filter/index.md)`>)` + +Finds the objects that are leaking by scanning all objects in the heap dump +and delegating the decision to a list of [FilteringLeakingObjectFinder.LeakingObjectFilter](-leaking-object-filter/index.md) + diff --git a/docs/api/shark/shark/-filtering-leaking-object-finder/-leaking-object-filter/index.md b/docs/api/shark/shark/-filtering-leaking-object-finder/-leaking-object-filter/index.md new file mode 100644 index 0000000000..5bdcd1d1a5 --- /dev/null +++ b/docs/api/shark/shark/-filtering-leaking-object-finder/-leaking-object-filter/index.md @@ -0,0 +1,13 @@ +[shark](../../../index.md) / [shark](../../index.md) / [FilteringLeakingObjectFinder](../index.md) / [LeakingObjectFilter](./index.md) + +# LeakingObjectFilter + +`interface LeakingObjectFilter` + +Filter to be passed to the [FilteringLeakingObjectFinder](../index.md) constructor. + +### Functions + +| Name | Summary | +|---|---| +| [isLeakingObject](is-leaking-object.md) | `abstract fun isLeakingObject(heapObject: HeapObject): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)
Returns whether the passed in [heapObject](is-leaking-object.md#shark.FilteringLeakingObjectFinder.LeakingObjectFilter$isLeakingObject(shark.HeapObject)/heapObject) is leaking. This should only return true when we're 100% sure the passed in [heapObject](is-leaking-object.md#shark.FilteringLeakingObjectFinder.LeakingObjectFilter$isLeakingObject(shark.HeapObject)/heapObject) should not be in memory anymore. | diff --git a/docs/api/shark/shark/-filtering-leaking-object-finder/-leaking-object-filter/is-leaking-object.md b/docs/api/shark/shark/-filtering-leaking-object-finder/-leaking-object-filter/is-leaking-object.md new file mode 100644 index 0000000000..74be7f7b63 --- /dev/null +++ b/docs/api/shark/shark/-filtering-leaking-object-finder/-leaking-object-filter/is-leaking-object.md @@ -0,0 +1,9 @@ +[shark](../../../index.md) / [shark](../../index.md) / [FilteringLeakingObjectFinder](../index.md) / [LeakingObjectFilter](index.md) / [isLeakingObject](./is-leaking-object.md) + +# isLeakingObject + +`abstract fun isLeakingObject(heapObject: HeapObject): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) + +Returns whether the passed in [heapObject](is-leaking-object.md#shark.FilteringLeakingObjectFinder.LeakingObjectFilter$isLeakingObject(shark.HeapObject)/heapObject) is leaking. This should only return true +when we're 100% sure the passed in [heapObject](is-leaking-object.md#shark.FilteringLeakingObjectFinder.LeakingObjectFilter$isLeakingObject(shark.HeapObject)/heapObject) should not be in memory anymore. + diff --git a/docs/api/shark/shark/-filtering-leaking-object-finder/find-leaking-object-ids.md b/docs/api/shark/shark/-filtering-leaking-object-finder/find-leaking-object-ids.md new file mode 100644 index 0000000000..0e0dd41e73 --- /dev/null +++ b/docs/api/shark/shark/-filtering-leaking-object-finder/find-leaking-object-ids.md @@ -0,0 +1,10 @@ +[shark](../../index.md) / [shark](../index.md) / [FilteringLeakingObjectFinder](index.md) / [findLeakingObjectIds](./find-leaking-object-ids.md) + +# findLeakingObjectIds + +`fun findLeakingObjectIds(graph: HeapGraph): `[`Set`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`<`[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`>` + +Overrides [LeakingObjectFinder.findLeakingObjectIds](../-leaking-object-finder/find-leaking-object-ids.md) + +For a given heap graph, returns a set of object ids for the objects that are leaking. + diff --git a/docs/api/shark/shark/-filtering-leaking-object-finder/index.md b/docs/api/shark/shark/-filtering-leaking-object-finder/index.md new file mode 100644 index 0000000000..13b6045ee2 --- /dev/null +++ b/docs/api/shark/shark/-filtering-leaking-object-finder/index.md @@ -0,0 +1,26 @@ +[shark](../../index.md) / [shark](../index.md) / [FilteringLeakingObjectFinder](./index.md) + +# FilteringLeakingObjectFinder + +`class FilteringLeakingObjectFinder : `[`LeakingObjectFinder`](../-leaking-object-finder/index.md) + +Finds the objects that are leaking by scanning all objects in the heap dump +and delegating the decision to a list of [FilteringLeakingObjectFinder.LeakingObjectFilter](-leaking-object-filter/index.md) + +### Types + +| Name | Summary | +|---|---| +| [LeakingObjectFilter](-leaking-object-filter/index.md) | `interface LeakingObjectFilter`
Filter to be passed to the [FilteringLeakingObjectFinder](./index.md) constructor. | + +### Constructors + +| Name | Summary | +|---|---| +| [<init>](-init-.md) | `FilteringLeakingObjectFinder(filters: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`FilteringLeakingObjectFinder.LeakingObjectFilter`](-leaking-object-filter/index.md)`>)`
Finds the objects that are leaking by scanning all objects in the heap dump and delegating the decision to a list of [FilteringLeakingObjectFinder.LeakingObjectFilter](-leaking-object-filter/index.md) | + +### Functions + +| Name | Summary | +|---|---| +| [findLeakingObjectIds](find-leaking-object-ids.md) | `fun findLeakingObjectIds(graph: HeapGraph): `[`Set`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`<`[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`>`
For a given heap graph, returns a set of object ids for the objects that are leaking. | diff --git a/docs/api/shark/shark/-heap-analysis-success/all-leaks.md b/docs/api/shark/shark/-heap-analysis-success/all-leaks.md index 3b8e7ff07e..23c046efb9 100644 --- a/docs/api/shark/shark/-heap-analysis-success/all-leaks.md +++ b/docs/api/shark/shark/-heap-analysis-success/all-leaks.md @@ -2,7 +2,7 @@ # allLeaks -`val allLeaks: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`Leak`](../-leak/index.md)`>` +`val allLeaks: `[`Sequence`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/-sequence/index.html)`<`[`Leak`](../-leak/index.md)`>` The list of [Leak](../-leak/index.md) found in the heap dump by [HeapAnalyzer](../-heap-analyzer/index.md), ie all [applicationLeaks](application-leaks.md) and all [libraryLeaks](library-leaks.md) in one list. diff --git a/docs/api/shark/shark/-heap-analysis-success/index.md b/docs/api/shark/shark/-heap-analysis-success/index.md index 28a52142b5..3c8285748d 100644 --- a/docs/api/shark/shark/-heap-analysis-success/index.md +++ b/docs/api/shark/shark/-heap-analysis-success/index.md @@ -16,7 +16,7 @@ The result of a successful heap analysis performed by [HeapAnalyzer](../-heap-an | Name | Summary | |---|---| -| [allLeaks](all-leaks.md) | `val allLeaks: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`Leak`](../-leak/index.md)`>`
The list of [Leak](../-leak/index.md) found in the heap dump by [HeapAnalyzer](../-heap-analyzer/index.md), ie all [applicationLeaks](application-leaks.md) and all [libraryLeaks](library-leaks.md) in one list. | +| [allLeaks](all-leaks.md) | `val allLeaks: `[`Sequence`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/-sequence/index.html)`<`[`Leak`](../-leak/index.md)`>`
The list of [Leak](../-leak/index.md) found in the heap dump by [HeapAnalyzer](../-heap-analyzer/index.md), ie all [applicationLeaks](application-leaks.md) and all [libraryLeaks](library-leaks.md) in one list. | | [analysisDurationMillis](analysis-duration-millis.md) | `val analysisDurationMillis: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)
Total time spent analyzing the heap. | | [applicationLeaks](application-leaks.md) | `val applicationLeaks: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`ApplicationLeak`](../-application-leak/index.md)`>`
The list of [ApplicationLeak](../-application-leak/index.md) found in the heap dump by [HeapAnalyzer](../-heap-analyzer/index.md). | | [createdAtTimeMillis](created-at-time-millis.md) | `val createdAtTimeMillis: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)
The [System.currentTimeMillis](https://docs.oracle.com/javase/6/docs/api/java/lang/System.html#currentTimeMillis()) when this [HeapAnalysis](../-heap-analysis/index.md) instance was created. | @@ -29,3 +29,9 @@ The result of a successful heap analysis performed by [HeapAnalyzer](../-heap-an | Name | Summary | |---|---| | [toString](to-string.md) | `fun toString(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | + +### Companion Object Functions + +| Name | Summary | +|---|---| +| [upgradeFrom20Deserialized](upgrade-from20-deserialized.md) | `fun upgradeFrom20Deserialized(fromV20: `[`HeapAnalysisSuccess`](./index.md)`): `[`HeapAnalysisSuccess`](./index.md)
If [fromV20](upgrade-from20-deserialized.md#shark.HeapAnalysisSuccess.Companion$upgradeFrom20Deserialized(shark.HeapAnalysisSuccess)/fromV20) was serialized in LeakCanary 2.0, you must deserialize it and call this method to create a usable [HeapAnalysisSuccess](./index.md) instance. | diff --git a/docs/api/shark/shark/-heap-analysis-success/upgrade-from20-deserialized.md b/docs/api/shark/shark/-heap-analysis-success/upgrade-from20-deserialized.md new file mode 100644 index 0000000000..b4c744e8c1 --- /dev/null +++ b/docs/api/shark/shark/-heap-analysis-success/upgrade-from20-deserialized.md @@ -0,0 +1,9 @@ +[shark](../../index.md) / [shark](../index.md) / [HeapAnalysisSuccess](index.md) / [upgradeFrom20Deserialized](./upgrade-from20-deserialized.md) + +# upgradeFrom20Deserialized + +`fun upgradeFrom20Deserialized(fromV20: `[`HeapAnalysisSuccess`](index.md)`): `[`HeapAnalysisSuccess`](index.md) + +If [fromV20](upgrade-from20-deserialized.md#shark.HeapAnalysisSuccess.Companion$upgradeFrom20Deserialized(shark.HeapAnalysisSuccess)/fromV20) was serialized in LeakCanary 2.0, you must deserialize it and call this +method to create a usable [HeapAnalysisSuccess](index.md) instance. + diff --git a/docs/api/shark/shark/-heap-analyzer/analyze.md b/docs/api/shark/shark/-heap-analyzer/analyze.md index 0e6dd26919..ea9192a620 100644 --- a/docs/api/shark/shark/-heap-analyzer/analyze.md +++ b/docs/api/shark/shark/-heap-analyzer/analyze.md @@ -2,8 +2,9 @@ # analyze -`fun analyze(heapDumpFile: `[`File`](https://docs.oracle.com/javase/6/docs/api/java/io/File.html)`, referenceMatchers: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`ReferenceMatcher`](../-reference-matcher/index.md)`> = emptyList(), computeRetainedHeapSize: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false, objectInspectors: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`ObjectInspector`](../-object-inspector/index.md)`> = emptyList(), leakFinders: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`ObjectInspector`](../-object-inspector/index.md)`> = objectInspectors, metadataExtractor: `[`MetadataExtractor`](../-metadata-extractor/index.md)` = MetadataExtractor.NO_OP, proguardMapping: ProguardMapping? = null): `[`HeapAnalysis`](../-heap-analysis/index.md) +`fun analyze(heapDumpFile: `[`File`](https://docs.oracle.com/javase/6/docs/api/java/io/File.html)`, leakingObjectFinder: `[`LeakingObjectFinder`](../-leaking-object-finder/index.md)`, referenceMatchers: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`ReferenceMatcher`](../-reference-matcher/index.md)`> = emptyList(), computeRetainedHeapSize: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false, objectInspectors: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`ObjectInspector`](../-object-inspector/index.md)`> = emptyList(), metadataExtractor: `[`MetadataExtractor`](../-metadata-extractor/index.md)` = MetadataExtractor.NO_OP, proguardMapping: ProguardMapping? = null): `[`HeapAnalysis`](../-heap-analysis/index.md) Searches the heap dump for leaking instances and then computes the shortest strong reference path from those instances to the GC roots. +`fun analyze(heapDumpFile: `[`File`](https://docs.oracle.com/javase/6/docs/api/java/io/File.html)`, graph: HeapGraph, leakingObjectFinder: `[`LeakingObjectFinder`](../-leaking-object-finder/index.md)`, referenceMatchers: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`ReferenceMatcher`](../-reference-matcher/index.md)`> = emptyList(), computeRetainedHeapSize: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false, objectInspectors: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`ObjectInspector`](../-object-inspector/index.md)`> = emptyList(), metadataExtractor: `[`MetadataExtractor`](../-metadata-extractor/index.md)` = MetadataExtractor.NO_OP): `[`HeapAnalysis`](../-heap-analysis/index.md) \ No newline at end of file diff --git a/docs/api/shark/shark/-heap-analyzer/index.md b/docs/api/shark/shark/-heap-analyzer/index.md index 92d552f0d2..864b1afcc8 100644 --- a/docs/api/shark/shark/-heap-analyzer/index.md +++ b/docs/api/shark/shark/-heap-analyzer/index.md @@ -16,4 +16,4 @@ Analyzes heap dumps to look for leaks. | Name | Summary | |---|---| -| [analyze](analyze.md) | `fun analyze(heapDumpFile: `[`File`](https://docs.oracle.com/javase/6/docs/api/java/io/File.html)`, referenceMatchers: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`ReferenceMatcher`](../-reference-matcher/index.md)`> = emptyList(), computeRetainedHeapSize: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false, objectInspectors: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`ObjectInspector`](../-object-inspector/index.md)`> = emptyList(), leakFinders: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`ObjectInspector`](../-object-inspector/index.md)`> = objectInspectors, metadataExtractor: `[`MetadataExtractor`](../-metadata-extractor/index.md)` = MetadataExtractor.NO_OP, proguardMapping: ProguardMapping? = null): `[`HeapAnalysis`](../-heap-analysis/index.md)
Searches the heap dump for leaking instances and then computes the shortest strong reference path from those instances to the GC roots. | +| [analyze](analyze.md) | `fun analyze(heapDumpFile: `[`File`](https://docs.oracle.com/javase/6/docs/api/java/io/File.html)`, leakingObjectFinder: `[`LeakingObjectFinder`](../-leaking-object-finder/index.md)`, referenceMatchers: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`ReferenceMatcher`](../-reference-matcher/index.md)`> = emptyList(), computeRetainedHeapSize: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false, objectInspectors: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`ObjectInspector`](../-object-inspector/index.md)`> = emptyList(), metadataExtractor: `[`MetadataExtractor`](../-metadata-extractor/index.md)` = MetadataExtractor.NO_OP, proguardMapping: ProguardMapping? = null): `[`HeapAnalysis`](../-heap-analysis/index.md)
Searches the heap dump for leaking instances and then computes the shortest strong reference path from those instances to the GC roots.`fun analyze(heapDumpFile: `[`File`](https://docs.oracle.com/javase/6/docs/api/java/io/File.html)`, graph: HeapGraph, leakingObjectFinder: `[`LeakingObjectFinder`](../-leaking-object-finder/index.md)`, referenceMatchers: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`ReferenceMatcher`](../-reference-matcher/index.md)`> = emptyList(), computeRetainedHeapSize: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false, objectInspectors: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`ObjectInspector`](../-object-inspector/index.md)`> = emptyList(), metadataExtractor: `[`MetadataExtractor`](../-metadata-extractor/index.md)` = MetadataExtractor.NO_OP): `[`HeapAnalysis`](../-heap-analysis/index.md) | diff --git a/docs/api/shark/shark/-keyed-weak-reference-finder/find-leaking-object-ids.md b/docs/api/shark/shark/-keyed-weak-reference-finder/find-leaking-object-ids.md new file mode 100644 index 0000000000..b70495218c --- /dev/null +++ b/docs/api/shark/shark/-keyed-weak-reference-finder/find-leaking-object-ids.md @@ -0,0 +1,10 @@ +[shark](../../index.md) / [shark](../index.md) / [KeyedWeakReferenceFinder](index.md) / [findLeakingObjectIds](./find-leaking-object-ids.md) + +# findLeakingObjectIds + +`fun findLeakingObjectIds(graph: HeapGraph): `[`Set`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`<`[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`>` + +Overrides [LeakingObjectFinder.findLeakingObjectIds](../-leaking-object-finder/find-leaking-object-ids.md) + +For a given heap graph, returns a set of object ids for the objects that are leaking. + diff --git a/docs/api/shark/shark/-keyed-weak-reference-finder/index.md b/docs/api/shark/shark/-keyed-weak-reference-finder/index.md new file mode 100644 index 0000000000..c8cacbde72 --- /dev/null +++ b/docs/api/shark/shark/-keyed-weak-reference-finder/index.md @@ -0,0 +1,14 @@ +[shark](../../index.md) / [shark](../index.md) / [KeyedWeakReferenceFinder](./index.md) + +# KeyedWeakReferenceFinder + +`object KeyedWeakReferenceFinder : `[`LeakingObjectFinder`](../-leaking-object-finder/index.md) + +Finds all objects tracked by a KeyedWeakReference, ie all objects that were passed to +ObjectWatcher.watch. + +### Functions + +| Name | Summary | +|---|---| +| [findLeakingObjectIds](find-leaking-object-ids.md) | `fun findLeakingObjectIds(graph: HeapGraph): `[`Set`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`<`[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`>`
For a given heap graph, returns a set of object ids for the objects that are leaking. | diff --git a/docs/api/shark/shark/-leak-node-status/-l-e-a-k-i-n-g.md b/docs/api/shark/shark/-leak-node-status/-l-e-a-k-i-n-g.md deleted file mode 100644 index 78470f7c9b..0000000000 --- a/docs/api/shark/shark/-leak-node-status/-l-e-a-k-i-n-g.md +++ /dev/null @@ -1,8 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [LeakNodeStatus](index.md) / [LEAKING](./-l-e-a-k-i-n-g.md) - -# LEAKING - -`LEAKING` - -The instance was no longer needed and therefore expected to be unreachable. - diff --git a/docs/api/shark/shark/-leak-node-status/-n-o-t_-l-e-a-k-i-n-g.md b/docs/api/shark/shark/-leak-node-status/-n-o-t_-l-e-a-k-i-n-g.md deleted file mode 100644 index 4e1e91b5e7..0000000000 --- a/docs/api/shark/shark/-leak-node-status/-n-o-t_-l-e-a-k-i-n-g.md +++ /dev/null @@ -1,8 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [LeakNodeStatus](index.md) / [NOT_LEAKING](./-n-o-t_-l-e-a-k-i-n-g.md) - -# NOT_LEAKING - -`NOT_LEAKING` - -The instance was needed and therefore expected to be reachable. - diff --git a/docs/api/shark/shark/-leak-node-status/-u-n-k-n-o-w-n.md b/docs/api/shark/shark/-leak-node-status/-u-n-k-n-o-w-n.md deleted file mode 100644 index 1f16396c75..0000000000 --- a/docs/api/shark/shark/-leak-node-status/-u-n-k-n-o-w-n.md +++ /dev/null @@ -1,8 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [LeakNodeStatus](index.md) / [UNKNOWN](./-u-n-k-n-o-w-n.md) - -# UNKNOWN - -`UNKNOWN` - -No decision can be made about the provided instance. - diff --git a/docs/api/shark/shark/-leak-node-status/index.md b/docs/api/shark/shark/-leak-node-status/index.md deleted file mode 100644 index e485f803a7..0000000000 --- a/docs/api/shark/shark/-leak-node-status/index.md +++ /dev/null @@ -1,13 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [LeakNodeStatus](./index.md) - -# LeakNodeStatus - -`enum class LeakNodeStatus` - -### Enum Values - -| Name | Summary | -|---|---| -| [NOT_LEAKING](-n-o-t_-l-e-a-k-i-n-g.md) | The instance was needed and therefore expected to be reachable. | -| [LEAKING](-l-e-a-k-i-n-g.md) | The instance was no longer needed and therefore expected to be unreachable. | -| [UNKNOWN](-u-n-k-n-o-w-n.md) | No decision can be made about the provided instance. | diff --git a/docs/api/shark/shark/-leak-reference/-init-.md b/docs/api/shark/shark/-leak-reference/-init-.md deleted file mode 100644 index e9d837c324..0000000000 --- a/docs/api/shark/shark/-leak-reference/-init-.md +++ /dev/null @@ -1,8 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [LeakReference](index.md) / [<init>](./-init-.md) - -# <init> - -`LeakReference(type: `[`LeakTraceElement.Type`](../-leak-trace-element/-type/index.md)`, name: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` - -A single field in a [LeakTraceElement](../-leak-trace-element/index.md). - diff --git a/docs/api/shark/shark/-leak-reference/display-name.md b/docs/api/shark/shark/-leak-reference/display-name.md deleted file mode 100644 index 1d3b039462..0000000000 --- a/docs/api/shark/shark/-leak-reference/display-name.md +++ /dev/null @@ -1,5 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [LeakReference](index.md) / [displayName](./display-name.md) - -# displayName - -`val displayName: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-reference/grouping-name.md b/docs/api/shark/shark/-leak-reference/grouping-name.md deleted file mode 100644 index 7e3fa47ba2..0000000000 --- a/docs/api/shark/shark/-leak-reference/grouping-name.md +++ /dev/null @@ -1,5 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [LeakReference](index.md) / [groupingName](./grouping-name.md) - -# groupingName - -`val groupingName: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-reference/index.md b/docs/api/shark/shark/-leak-reference/index.md deleted file mode 100644 index 56ff917c40..0000000000 --- a/docs/api/shark/shark/-leak-reference/index.md +++ /dev/null @@ -1,22 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [LeakReference](./index.md) - -# LeakReference - -`data class LeakReference : `[`Serializable`](https://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html) - -A single field in a [LeakTraceElement](../-leak-trace-element/index.md). - -### Constructors - -| Name | Summary | -|---|---| -| [<init>](-init-.md) | `LeakReference(type: `[`LeakTraceElement.Type`](../-leak-trace-element/-type/index.md)`, name: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)`
A single field in a [LeakTraceElement](../-leak-trace-element/index.md). | - -### Properties - -| Name | Summary | -|---|---| -| [displayName](display-name.md) | `val displayName: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | -| [groupingName](grouping-name.md) | `val groupingName: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | -| [name](name.md) | `val name: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | -| [type](type.md) | `val type: `[`LeakTraceElement.Type`](../-leak-trace-element/-type/index.md) | diff --git a/docs/api/shark/shark/-leak-reference/name.md b/docs/api/shark/shark/-leak-reference/name.md deleted file mode 100644 index 3f89aaae75..0000000000 --- a/docs/api/shark/shark/-leak-reference/name.md +++ /dev/null @@ -1,5 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [LeakReference](index.md) / [name](./name.md) - -# name - -`val name: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-reference/type.md b/docs/api/shark/shark/-leak-reference/type.md deleted file mode 100644 index d2555da65c..0000000000 --- a/docs/api/shark/shark/-leak-reference/type.md +++ /dev/null @@ -1,5 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [LeakReference](index.md) / [type](./type.md) - -# type - -`val type: `[`LeakTraceElement.Type`](../-leak-trace-element/-type/index.md) \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace-element/-holder/-o-b-j-e-c-t.md b/docs/api/shark/shark/-leak-trace-element/-holder/-o-b-j-e-c-t.md deleted file mode 100644 index 547234851e..0000000000 --- a/docs/api/shark/shark/-leak-trace-element/-holder/-o-b-j-e-c-t.md +++ /dev/null @@ -1,5 +0,0 @@ -[shark](../../../index.md) / [shark](../../index.md) / [LeakTraceElement](../index.md) / [Holder](index.md) / [OBJECT](./-o-b-j-e-c-t.md) - -# OBJECT - -`OBJECT` \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace-element/-holder/-t-h-r-e-a-d.md b/docs/api/shark/shark/-leak-trace-element/-holder/-t-h-r-e-a-d.md deleted file mode 100644 index c2706cddfd..0000000000 --- a/docs/api/shark/shark/-leak-trace-element/-holder/-t-h-r-e-a-d.md +++ /dev/null @@ -1,5 +0,0 @@ -[shark](../../../index.md) / [shark](../../index.md) / [LeakTraceElement](../index.md) / [Holder](index.md) / [THREAD](./-t-h-r-e-a-d.md) - -# THREAD - -`THREAD` \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace-element/-init-.md b/docs/api/shark/shark/-leak-trace-element/-init-.md deleted file mode 100644 index b0bdcaa0ce..0000000000 --- a/docs/api/shark/shark/-leak-trace-element/-init-.md +++ /dev/null @@ -1,5 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [LeakTraceElement](index.md) / [<init>](./-init-.md) - -# <init> - -`LeakTraceElement(reference: `[`LeakReference`](../-leak-reference/index.md)`?, holder: `[`LeakTraceElement.Holder`](-holder/index.md)`, className: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, labels: `[`Set`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>, leakStatus: `[`LeakNodeStatus`](../-leak-node-status/index.md)`, leakStatusReason: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace-element/-type/-a-r-r-a-y_-e-n-t-r-y.md b/docs/api/shark/shark/-leak-trace-element/-type/-a-r-r-a-y_-e-n-t-r-y.md deleted file mode 100644 index e5bbaea27f..0000000000 --- a/docs/api/shark/shark/-leak-trace-element/-type/-a-r-r-a-y_-e-n-t-r-y.md +++ /dev/null @@ -1,5 +0,0 @@ -[shark](../../../index.md) / [shark](../../index.md) / [LeakTraceElement](../index.md) / [Type](index.md) / [ARRAY_ENTRY](./-a-r-r-a-y_-e-n-t-r-y.md) - -# ARRAY_ENTRY - -`ARRAY_ENTRY` \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace-element/-type/-i-n-s-t-a-n-c-e_-f-i-e-l-d.md b/docs/api/shark/shark/-leak-trace-element/-type/-i-n-s-t-a-n-c-e_-f-i-e-l-d.md deleted file mode 100644 index ad415fbd9e..0000000000 --- a/docs/api/shark/shark/-leak-trace-element/-type/-i-n-s-t-a-n-c-e_-f-i-e-l-d.md +++ /dev/null @@ -1,5 +0,0 @@ -[shark](../../../index.md) / [shark](../../index.md) / [LeakTraceElement](../index.md) / [Type](index.md) / [INSTANCE_FIELD](./-i-n-s-t-a-n-c-e_-f-i-e-l-d.md) - -# INSTANCE_FIELD - -`INSTANCE_FIELD` \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace-element/-type/-s-t-a-t-i-c_-f-i-e-l-d.md b/docs/api/shark/shark/-leak-trace-element/-type/-s-t-a-t-i-c_-f-i-e-l-d.md deleted file mode 100644 index 2d773adf74..0000000000 --- a/docs/api/shark/shark/-leak-trace-element/-type/-s-t-a-t-i-c_-f-i-e-l-d.md +++ /dev/null @@ -1,5 +0,0 @@ -[shark](../../../index.md) / [shark](../../index.md) / [LeakTraceElement](../index.md) / [Type](index.md) / [STATIC_FIELD](./-s-t-a-t-i-c_-f-i-e-l-d.md) - -# STATIC_FIELD - -`STATIC_FIELD` \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace-element/class-name.md b/docs/api/shark/shark/-leak-trace-element/class-name.md deleted file mode 100644 index 6be6d72160..0000000000 --- a/docs/api/shark/shark/-leak-trace-element/class-name.md +++ /dev/null @@ -1,5 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [LeakTraceElement](index.md) / [className](./class-name.md) - -# className - -`val className: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace-element/class-simple-name.md b/docs/api/shark/shark/-leak-trace-element/class-simple-name.md deleted file mode 100644 index 608e49b3ec..0000000000 --- a/docs/api/shark/shark/-leak-trace-element/class-simple-name.md +++ /dev/null @@ -1,8 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [LeakTraceElement](index.md) / [classSimpleName](./class-simple-name.md) - -# classSimpleName - -`val classSimpleName: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) - -Returns {@link #className} without the package. - diff --git a/docs/api/shark/shark/-leak-trace-element/holder.md b/docs/api/shark/shark/-leak-trace-element/holder.md deleted file mode 100644 index 51cef25751..0000000000 --- a/docs/api/shark/shark/-leak-trace-element/holder.md +++ /dev/null @@ -1,5 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [LeakTraceElement](index.md) / [holder](./holder.md) - -# holder - -`val holder: `[`LeakTraceElement.Holder`](-holder/index.md) \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace-element/index.md b/docs/api/shark/shark/-leak-trace-element/index.md deleted file mode 100644 index 6ef89d9eef..0000000000 --- a/docs/api/shark/shark/-leak-trace-element/index.md +++ /dev/null @@ -1,30 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [LeakTraceElement](./index.md) - -# LeakTraceElement - -`data class LeakTraceElement : `[`Serializable`](https://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html) - -### Types - -| Name | Summary | -|---|---| -| [Holder](-holder/index.md) | `enum class Holder` | -| [Type](-type/index.md) | `enum class Type` | - -### Constructors - -| Name | Summary | -|---|---| -| [<init>](-init-.md) | `LeakTraceElement(reference: `[`LeakReference`](../-leak-reference/index.md)`?, holder: `[`LeakTraceElement.Holder`](-holder/index.md)`, className: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, labels: `[`Set`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>, leakStatus: `[`LeakNodeStatus`](../-leak-node-status/index.md)`, leakStatusReason: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` | - -### Properties - -| Name | Summary | -|---|---| -| [className](class-name.md) | `val className: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | -| [classSimpleName](class-simple-name.md) | `val classSimpleName: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
Returns {@link #className} without the package. | -| [holder](holder.md) | `val holder: `[`LeakTraceElement.Holder`](-holder/index.md) | -| [labels](labels.md) | `val labels: `[`Set`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>`
Labels that were computed during analysis. A label provides extra information that helps understand the leak trace element. | -| [leakStatus](leak-status.md) | `val leakStatus: `[`LeakNodeStatus`](../-leak-node-status/index.md) | -| [leakStatusReason](leak-status-reason.md) | `val leakStatusReason: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | -| [reference](reference.md) | `val reference: `[`LeakReference`](../-leak-reference/index.md)`?`
Information about the reference that points to the next [LeakTraceElement](./index.md) in [LeakTrace.elements](../-leak-trace/elements.md). Null if this is the last element in the leak trace, ie the leaking object. | diff --git a/docs/api/shark/shark/-leak-trace-element/leak-status-reason.md b/docs/api/shark/shark/-leak-trace-element/leak-status-reason.md deleted file mode 100644 index 862d304e84..0000000000 --- a/docs/api/shark/shark/-leak-trace-element/leak-status-reason.md +++ /dev/null @@ -1,5 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [LeakTraceElement](index.md) / [leakStatusReason](./leak-status-reason.md) - -# leakStatusReason - -`val leakStatusReason: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace-element/leak-status.md b/docs/api/shark/shark/-leak-trace-element/leak-status.md deleted file mode 100644 index 92a110ea55..0000000000 --- a/docs/api/shark/shark/-leak-trace-element/leak-status.md +++ /dev/null @@ -1,5 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [LeakTraceElement](index.md) / [leakStatus](./leak-status.md) - -# leakStatus - -`val leakStatus: `[`LeakNodeStatus`](../-leak-node-status/index.md) \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace-element/reference.md b/docs/api/shark/shark/-leak-trace-element/reference.md deleted file mode 100644 index cd6973e782..0000000000 --- a/docs/api/shark/shark/-leak-trace-element/reference.md +++ /dev/null @@ -1,10 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [LeakTraceElement](index.md) / [reference](./reference.md) - -# reference - -`val reference: `[`LeakReference`](../-leak-reference/index.md)`?` - -Information about the reference that points to the next [LeakTraceElement](index.md) in -[LeakTrace.elements](../-leak-trace/elements.md). Null if this is the last element in the leak trace, ie the leaking -object. - diff --git a/docs/api/shark/shark/-leak-trace-object/-init-.md b/docs/api/shark/shark/-leak-trace-object/-init-.md new file mode 100644 index 0000000000..9f401c3aef --- /dev/null +++ b/docs/api/shark/shark/-leak-trace-object/-init-.md @@ -0,0 +1,5 @@ +[shark](../../index.md) / [shark](../index.md) / [LeakTraceObject](index.md) / [<init>](./-init-.md) + +# <init> + +`LeakTraceObject(type: `[`LeakTraceObject.ObjectType`](-object-type/index.md)`, className: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, labels: `[`Set`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>, leakingStatus: `[`LeakTraceObject.LeakingStatus`](-leaking-status/index.md)`, leakingStatusReason: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace-object/-leaking-status/-l-e-a-k-i-n-g.md b/docs/api/shark/shark/-leak-trace-object/-leaking-status/-l-e-a-k-i-n-g.md new file mode 100644 index 0000000000..f3934b2b3a --- /dev/null +++ b/docs/api/shark/shark/-leak-trace-object/-leaking-status/-l-e-a-k-i-n-g.md @@ -0,0 +1,8 @@ +[shark](../../../index.md) / [shark](../../index.md) / [LeakTraceObject](../index.md) / [LeakingStatus](index.md) / [LEAKING](./-l-e-a-k-i-n-g.md) + +# LEAKING + +`LEAKING` + +The object was no longer needed and therefore expected to be unreachable. + diff --git a/docs/api/shark/shark/-leak-trace-object/-leaking-status/-n-o-t_-l-e-a-k-i-n-g.md b/docs/api/shark/shark/-leak-trace-object/-leaking-status/-n-o-t_-l-e-a-k-i-n-g.md new file mode 100644 index 0000000000..ff3ffc53c3 --- /dev/null +++ b/docs/api/shark/shark/-leak-trace-object/-leaking-status/-n-o-t_-l-e-a-k-i-n-g.md @@ -0,0 +1,8 @@ +[shark](../../../index.md) / [shark](../../index.md) / [LeakTraceObject](../index.md) / [LeakingStatus](index.md) / [NOT_LEAKING](./-n-o-t_-l-e-a-k-i-n-g.md) + +# NOT_LEAKING + +`NOT_LEAKING` + +The object was needed and therefore expected to be reachable. + diff --git a/docs/api/shark/shark/-leak-trace-object/-leaking-status/-u-n-k-n-o-w-n.md b/docs/api/shark/shark/-leak-trace-object/-leaking-status/-u-n-k-n-o-w-n.md new file mode 100644 index 0000000000..a5b3cda27e --- /dev/null +++ b/docs/api/shark/shark/-leak-trace-object/-leaking-status/-u-n-k-n-o-w-n.md @@ -0,0 +1,8 @@ +[shark](../../../index.md) / [shark](../../index.md) / [LeakTraceObject](../index.md) / [LeakingStatus](index.md) / [UNKNOWN](./-u-n-k-n-o-w-n.md) + +# UNKNOWN + +`UNKNOWN` + +No decision can be made about the provided object. + diff --git a/docs/api/shark/shark/-leak-trace-object/-leaking-status/index.md b/docs/api/shark/shark/-leak-trace-object/-leaking-status/index.md new file mode 100644 index 0000000000..6b147e7f37 --- /dev/null +++ b/docs/api/shark/shark/-leak-trace-object/-leaking-status/index.md @@ -0,0 +1,13 @@ +[shark](../../../index.md) / [shark](../../index.md) / [LeakTraceObject](../index.md) / [LeakingStatus](./index.md) + +# LeakingStatus + +`enum class LeakingStatus` + +### Enum Values + +| Name | Summary | +|---|---| +| [NOT_LEAKING](-n-o-t_-l-e-a-k-i-n-g.md) | The object was needed and therefore expected to be reachable. | +| [LEAKING](-l-e-a-k-i-n-g.md) | The object was no longer needed and therefore expected to be unreachable. | +| [UNKNOWN](-u-n-k-n-o-w-n.md) | No decision can be made about the provided object. | diff --git a/docs/api/shark/shark/-leak-trace-element/-holder/-a-r-r-a-y.md b/docs/api/shark/shark/-leak-trace-object/-object-type/-a-r-r-a-y.md similarity index 52% rename from docs/api/shark/shark/-leak-trace-element/-holder/-a-r-r-a-y.md rename to docs/api/shark/shark/-leak-trace-object/-object-type/-a-r-r-a-y.md index 4704019990..b3307836c6 100644 --- a/docs/api/shark/shark/-leak-trace-element/-holder/-a-r-r-a-y.md +++ b/docs/api/shark/shark/-leak-trace-object/-object-type/-a-r-r-a-y.md @@ -1,4 +1,4 @@ -[shark](../../../index.md) / [shark](../../index.md) / [LeakTraceElement](../index.md) / [Holder](index.md) / [ARRAY](./-a-r-r-a-y.md) +[shark](../../../index.md) / [shark](../../index.md) / [LeakTraceObject](../index.md) / [ObjectType](index.md) / [ARRAY](./-a-r-r-a-y.md) # ARRAY diff --git a/docs/api/shark/shark/-leak-trace-element/-holder/-c-l-a-s-s.md b/docs/api/shark/shark/-leak-trace-object/-object-type/-c-l-a-s-s.md similarity index 52% rename from docs/api/shark/shark/-leak-trace-element/-holder/-c-l-a-s-s.md rename to docs/api/shark/shark/-leak-trace-object/-object-type/-c-l-a-s-s.md index bf63d78eab..257a80cd91 100644 --- a/docs/api/shark/shark/-leak-trace-element/-holder/-c-l-a-s-s.md +++ b/docs/api/shark/shark/-leak-trace-object/-object-type/-c-l-a-s-s.md @@ -1,4 +1,4 @@ -[shark](../../../index.md) / [shark](../../index.md) / [LeakTraceElement](../index.md) / [Holder](index.md) / [CLASS](./-c-l-a-s-s.md) +[shark](../../../index.md) / [shark](../../index.md) / [LeakTraceObject](../index.md) / [ObjectType](index.md) / [CLASS](./-c-l-a-s-s.md) # CLASS diff --git a/docs/api/shark/shark/-leak-trace-object/-object-type/-i-n-s-t-a-n-c-e.md b/docs/api/shark/shark/-leak-trace-object/-object-type/-i-n-s-t-a-n-c-e.md new file mode 100644 index 0000000000..4b083eb6ab --- /dev/null +++ b/docs/api/shark/shark/-leak-trace-object/-object-type/-i-n-s-t-a-n-c-e.md @@ -0,0 +1,5 @@ +[shark](../../../index.md) / [shark](../../index.md) / [LeakTraceObject](../index.md) / [ObjectType](index.md) / [INSTANCE](./-i-n-s-t-a-n-c-e.md) + +# INSTANCE + +`INSTANCE` \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace-element/-holder/index.md b/docs/api/shark/shark/-leak-trace-object/-object-type/index.md similarity index 55% rename from docs/api/shark/shark/-leak-trace-element/-holder/index.md rename to docs/api/shark/shark/-leak-trace-object/-object-type/index.md index 85845b369e..1bc6543c09 100644 --- a/docs/api/shark/shark/-leak-trace-element/-holder/index.md +++ b/docs/api/shark/shark/-leak-trace-object/-object-type/index.md @@ -1,14 +1,13 @@ -[shark](../../../index.md) / [shark](../../index.md) / [LeakTraceElement](../index.md) / [Holder](./index.md) +[shark](../../../index.md) / [shark](../../index.md) / [LeakTraceObject](../index.md) / [ObjectType](./index.md) -# Holder +# ObjectType -`enum class Holder` +`enum class ObjectType` ### Enum Values | Name | Summary | |---|---| -| [OBJECT](-o-b-j-e-c-t.md) | | | [CLASS](-c-l-a-s-s.md) | | -| [THREAD](-t-h-r-e-a-d.md) | | | [ARRAY](-a-r-r-a-y.md) | | +| [INSTANCE](-i-n-s-t-a-n-c-e.md) | | diff --git a/docs/api/shark/shark/-library-leak/class-name.md b/docs/api/shark/shark/-leak-trace-object/class-name.md similarity index 58% rename from docs/api/shark/shark/-library-leak/class-name.md rename to docs/api/shark/shark/-leak-trace-object/class-name.md index 8497a8764f..8072751b03 100644 --- a/docs/api/shark/shark/-library-leak/class-name.md +++ b/docs/api/shark/shark/-leak-trace-object/class-name.md @@ -1,11 +1,9 @@ -[shark](../../index.md) / [shark](../index.md) / [LibraryLeak](index.md) / [className](./class-name.md) +[shark](../../index.md) / [shark](../index.md) / [LeakTraceObject](index.md) / [className](./class-name.md) # className `val className: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) -Overrides [Leak.className](../-leak/class-name.md) - -Class name of the leaking object. +Class name of the object. The class name format is the same as what would be returned by [Class.getName](https://docs.oracle.com/javase/6/docs/api/java/lang/Class.html#getName()). diff --git a/docs/api/shark/shark/-leak-trace-object/class-simple-name.md b/docs/api/shark/shark/-leak-trace-object/class-simple-name.md new file mode 100644 index 0000000000..0e93f8c718 --- /dev/null +++ b/docs/api/shark/shark/-leak-trace-object/class-simple-name.md @@ -0,0 +1,9 @@ +[shark](../../index.md) / [shark](../index.md) / [LeakTraceObject](index.md) / [classSimpleName](./class-simple-name.md) + +# classSimpleName + +`val classSimpleName: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) + +Returns {@link #className} without the package, ie stripped of any string content before the +last period (included). + diff --git a/docs/api/shark/shark/-leak-trace-object/index.md b/docs/api/shark/shark/-leak-trace-object/index.md new file mode 100644 index 0000000000..fa8c1b3f45 --- /dev/null +++ b/docs/api/shark/shark/-leak-trace-object/index.md @@ -0,0 +1,30 @@ +[shark](../../index.md) / [shark](../index.md) / [LeakTraceObject](./index.md) + +# LeakTraceObject + +`data class LeakTraceObject : `[`Serializable`](https://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html) + +### Types + +| Name | Summary | +|---|---| +| [LeakingStatus](-leaking-status/index.md) | `enum class LeakingStatus` | +| [ObjectType](-object-type/index.md) | `enum class ObjectType` | + +### Constructors + +| Name | Summary | +|---|---| +| [<init>](-init-.md) | `LeakTraceObject(type: `[`LeakTraceObject.ObjectType`](-object-type/index.md)`, className: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, labels: `[`Set`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>, leakingStatus: `[`LeakTraceObject.LeakingStatus`](-leaking-status/index.md)`, leakingStatusReason: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` | + +### Properties + +| Name | Summary | +|---|---| +| [className](class-name.md) | `val className: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
Class name of the object. The class name format is the same as what would be returned by [Class.getName](https://docs.oracle.com/javase/6/docs/api/java/lang/Class.html#getName()). | +| [classSimpleName](class-simple-name.md) | `val classSimpleName: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
Returns {@link #className} without the package, ie stripped of any string content before the last period (included). | +| [labels](labels.md) | `val labels: `[`Set`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>`
Labels that were computed during analysis. A label provides extra information that helps understand the state of the leak trace object. | +| [leakingStatus](leaking-status.md) | `val leakingStatus: `[`LeakTraceObject.LeakingStatus`](-leaking-status/index.md) | +| [leakingStatusReason](leaking-status-reason.md) | `val leakingStatusReason: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | +| [type](type.md) | `val type: `[`LeakTraceObject.ObjectType`](-object-type/index.md) | +| [typeName](type-name.md) | `val typeName: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | diff --git a/docs/api/shark/shark/-leak-trace-element/labels.md b/docs/api/shark/shark/-leak-trace-object/labels.md similarity index 66% rename from docs/api/shark/shark/-leak-trace-element/labels.md rename to docs/api/shark/shark/-leak-trace-object/labels.md index 00fdcd4442..2afbc48fb0 100644 --- a/docs/api/shark/shark/-leak-trace-element/labels.md +++ b/docs/api/shark/shark/-leak-trace-object/labels.md @@ -1,9 +1,9 @@ -[shark](../../index.md) / [shark](../index.md) / [LeakTraceElement](index.md) / [labels](./labels.md) +[shark](../../index.md) / [shark](../index.md) / [LeakTraceObject](index.md) / [labels](./labels.md) # labels `val labels: `[`Set`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>` Labels that were computed during analysis. A label provides extra information that helps -understand the leak trace element. +understand the state of the leak trace object. diff --git a/docs/api/shark/shark/-leak-trace-object/leaking-status-reason.md b/docs/api/shark/shark/-leak-trace-object/leaking-status-reason.md new file mode 100644 index 0000000000..67694f2fa1 --- /dev/null +++ b/docs/api/shark/shark/-leak-trace-object/leaking-status-reason.md @@ -0,0 +1,5 @@ +[shark](../../index.md) / [shark](../index.md) / [LeakTraceObject](index.md) / [leakingStatusReason](./leaking-status-reason.md) + +# leakingStatusReason + +`val leakingStatusReason: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace-object/leaking-status.md b/docs/api/shark/shark/-leak-trace-object/leaking-status.md new file mode 100644 index 0000000000..860e40c244 --- /dev/null +++ b/docs/api/shark/shark/-leak-trace-object/leaking-status.md @@ -0,0 +1,5 @@ +[shark](../../index.md) / [shark](../index.md) / [LeakTraceObject](index.md) / [leakingStatus](./leaking-status.md) + +# leakingStatus + +`val leakingStatus: `[`LeakTraceObject.LeakingStatus`](-leaking-status/index.md) \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace-object/type-name.md b/docs/api/shark/shark/-leak-trace-object/type-name.md new file mode 100644 index 0000000000..1115c7056f --- /dev/null +++ b/docs/api/shark/shark/-leak-trace-object/type-name.md @@ -0,0 +1,5 @@ +[shark](../../index.md) / [shark](../index.md) / [LeakTraceObject](index.md) / [typeName](./type-name.md) + +# typeName + +`val typeName: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace-object/type.md b/docs/api/shark/shark/-leak-trace-object/type.md new file mode 100644 index 0000000000..61d40f0927 --- /dev/null +++ b/docs/api/shark/shark/-leak-trace-object/type.md @@ -0,0 +1,5 @@ +[shark](../../index.md) / [shark](../index.md) / [LeakTraceObject](index.md) / [type](./type.md) + +# type + +`val type: `[`LeakTraceObject.ObjectType`](-object-type/index.md) \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace-reference/-init-.md b/docs/api/shark/shark/-leak-trace-reference/-init-.md new file mode 100644 index 0000000000..de33df0996 --- /dev/null +++ b/docs/api/shark/shark/-leak-trace-reference/-init-.md @@ -0,0 +1,11 @@ +[shark](../../index.md) / [shark](../index.md) / [LeakTraceReference](index.md) / [<init>](./-init-.md) + +# <init> + +`LeakTraceReference(originObject: `[`LeakTraceObject`](../-leak-trace-object/index.md)`, referenceType: `[`LeakTraceReference.ReferenceType`](-reference-type/index.md)`, referenceName: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` + +A [LeakTraceReference](index.md) represents and origin [LeakTraceObject](../-leak-trace-object/index.md) and either a reference from that +object to the [LeakTraceObject](../-leak-trace-object/index.md) in the next [LeakTraceReference](index.md) in [LeakTrace.referencePath](../-leak-trace/reference-path.md), +or to [LeakTrace.leakingObject](../-leak-trace/leaking-object.md) if this is the last [LeakTraceReference](index.md) in +[LeakTrace.referencePath](../-leak-trace/reference-path.md). + diff --git a/docs/api/shark/shark/-leak-trace-reference/-reference-type/-a-r-r-a-y_-e-n-t-r-y.md b/docs/api/shark/shark/-leak-trace-reference/-reference-type/-a-r-r-a-y_-e-n-t-r-y.md new file mode 100644 index 0000000000..1a64142a82 --- /dev/null +++ b/docs/api/shark/shark/-leak-trace-reference/-reference-type/-a-r-r-a-y_-e-n-t-r-y.md @@ -0,0 +1,5 @@ +[shark](../../../index.md) / [shark](../../index.md) / [LeakTraceReference](../index.md) / [ReferenceType](index.md) / [ARRAY_ENTRY](./-a-r-r-a-y_-e-n-t-r-y.md) + +# ARRAY_ENTRY + +`ARRAY_ENTRY` \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace-reference/-reference-type/-i-n-s-t-a-n-c-e_-f-i-e-l-d.md b/docs/api/shark/shark/-leak-trace-reference/-reference-type/-i-n-s-t-a-n-c-e_-f-i-e-l-d.md new file mode 100644 index 0000000000..f4ecedc428 --- /dev/null +++ b/docs/api/shark/shark/-leak-trace-reference/-reference-type/-i-n-s-t-a-n-c-e_-f-i-e-l-d.md @@ -0,0 +1,5 @@ +[shark](../../../index.md) / [shark](../../index.md) / [LeakTraceReference](../index.md) / [ReferenceType](index.md) / [INSTANCE_FIELD](./-i-n-s-t-a-n-c-e_-f-i-e-l-d.md) + +# INSTANCE_FIELD + +`INSTANCE_FIELD` \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace-element/-type/-l-o-c-a-l.md b/docs/api/shark/shark/-leak-trace-reference/-reference-type/-l-o-c-a-l.md similarity index 50% rename from docs/api/shark/shark/-leak-trace-element/-type/-l-o-c-a-l.md rename to docs/api/shark/shark/-leak-trace-reference/-reference-type/-l-o-c-a-l.md index 2699b95f1b..3c764de990 100644 --- a/docs/api/shark/shark/-leak-trace-element/-type/-l-o-c-a-l.md +++ b/docs/api/shark/shark/-leak-trace-reference/-reference-type/-l-o-c-a-l.md @@ -1,4 +1,4 @@ -[shark](../../../index.md) / [shark](../../index.md) / [LeakTraceElement](../index.md) / [Type](index.md) / [LOCAL](./-l-o-c-a-l.md) +[shark](../../../index.md) / [shark](../../index.md) / [LeakTraceReference](../index.md) / [ReferenceType](index.md) / [LOCAL](./-l-o-c-a-l.md) # LOCAL diff --git a/docs/api/shark/shark/-leak-trace-reference/-reference-type/-s-t-a-t-i-c_-f-i-e-l-d.md b/docs/api/shark/shark/-leak-trace-reference/-reference-type/-s-t-a-t-i-c_-f-i-e-l-d.md new file mode 100644 index 0000000000..f48262abb2 --- /dev/null +++ b/docs/api/shark/shark/-leak-trace-reference/-reference-type/-s-t-a-t-i-c_-f-i-e-l-d.md @@ -0,0 +1,5 @@ +[shark](../../../index.md) / [shark](../../index.md) / [LeakTraceReference](../index.md) / [ReferenceType](index.md) / [STATIC_FIELD](./-s-t-a-t-i-c_-f-i-e-l-d.md) + +# STATIC_FIELD + +`STATIC_FIELD` \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace-element/-type/index.md b/docs/api/shark/shark/-leak-trace-reference/-reference-type/index.md similarity index 75% rename from docs/api/shark/shark/-leak-trace-element/-type/index.md rename to docs/api/shark/shark/-leak-trace-reference/-reference-type/index.md index d888c67ca3..39f80a9632 100644 --- a/docs/api/shark/shark/-leak-trace-element/-type/index.md +++ b/docs/api/shark/shark/-leak-trace-reference/-reference-type/index.md @@ -1,8 +1,8 @@ -[shark](../../../index.md) / [shark](../../index.md) / [LeakTraceElement](../index.md) / [Type](./index.md) +[shark](../../../index.md) / [shark](../../index.md) / [LeakTraceReference](../index.md) / [ReferenceType](./index.md) -# Type +# ReferenceType -`enum class Type` +`enum class ReferenceType` ### Enum Values diff --git a/docs/api/shark/shark/-leak-trace-reference/index.md b/docs/api/shark/shark/-leak-trace-reference/index.md new file mode 100644 index 0000000000..9d79c6646f --- /dev/null +++ b/docs/api/shark/shark/-leak-trace-reference/index.md @@ -0,0 +1,32 @@ +[shark](../../index.md) / [shark](../index.md) / [LeakTraceReference](./index.md) + +# LeakTraceReference + +`data class LeakTraceReference : `[`Serializable`](https://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html) + +A [LeakTraceReference](./index.md) represents and origin [LeakTraceObject](../-leak-trace-object/index.md) and either a reference from that +object to the [LeakTraceObject](../-leak-trace-object/index.md) in the next [LeakTraceReference](./index.md) in [LeakTrace.referencePath](../-leak-trace/reference-path.md), +or to [LeakTrace.leakingObject](../-leak-trace/leaking-object.md) if this is the last [LeakTraceReference](./index.md) in +[LeakTrace.referencePath](../-leak-trace/reference-path.md). + +### Types + +| Name | Summary | +|---|---| +| [ReferenceType](-reference-type/index.md) | `enum class ReferenceType` | + +### Constructors + +| Name | Summary | +|---|---| +| [<init>](-init-.md) | `LeakTraceReference(originObject: `[`LeakTraceObject`](../-leak-trace-object/index.md)`, referenceType: `[`LeakTraceReference.ReferenceType`](-reference-type/index.md)`, referenceName: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)`
A [LeakTraceReference](./index.md) represents and origin [LeakTraceObject](../-leak-trace-object/index.md) and either a reference from that object to the [LeakTraceObject](../-leak-trace-object/index.md) in the next [LeakTraceReference](./index.md) in [LeakTrace.referencePath](../-leak-trace/reference-path.md), or to [LeakTrace.leakingObject](../-leak-trace/leaking-object.md) if this is the last [LeakTraceReference](./index.md) in [LeakTrace.referencePath](../-leak-trace/reference-path.md). | + +### Properties + +| Name | Summary | +|---|---| +| [originObject](origin-object.md) | `val originObject: `[`LeakTraceObject`](../-leak-trace-object/index.md) | +| [referenceDisplayName](reference-display-name.md) | `val referenceDisplayName: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | +| [referenceGenericName](reference-generic-name.md) | `val referenceGenericName: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | +| [referenceName](reference-name.md) | `val referenceName: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | +| [referenceType](reference-type.md) | `val referenceType: `[`LeakTraceReference.ReferenceType`](-reference-type/index.md) | diff --git a/docs/api/shark/shark/-leak-trace-reference/origin-object.md b/docs/api/shark/shark/-leak-trace-reference/origin-object.md new file mode 100644 index 0000000000..bbfe447de7 --- /dev/null +++ b/docs/api/shark/shark/-leak-trace-reference/origin-object.md @@ -0,0 +1,5 @@ +[shark](../../index.md) / [shark](../index.md) / [LeakTraceReference](index.md) / [originObject](./origin-object.md) + +# originObject + +`val originObject: `[`LeakTraceObject`](../-leak-trace-object/index.md) \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace-reference/reference-display-name.md b/docs/api/shark/shark/-leak-trace-reference/reference-display-name.md new file mode 100644 index 0000000000..3f5fa5ef08 --- /dev/null +++ b/docs/api/shark/shark/-leak-trace-reference/reference-display-name.md @@ -0,0 +1,5 @@ +[shark](../../index.md) / [shark](../index.md) / [LeakTraceReference](index.md) / [referenceDisplayName](./reference-display-name.md) + +# referenceDisplayName + +`val referenceDisplayName: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace-reference/reference-generic-name.md b/docs/api/shark/shark/-leak-trace-reference/reference-generic-name.md new file mode 100644 index 0000000000..e8cbc51c80 --- /dev/null +++ b/docs/api/shark/shark/-leak-trace-reference/reference-generic-name.md @@ -0,0 +1,5 @@ +[shark](../../index.md) / [shark](../index.md) / [LeakTraceReference](index.md) / [referenceGenericName](./reference-generic-name.md) + +# referenceGenericName + +`val referenceGenericName: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace-reference/reference-name.md b/docs/api/shark/shark/-leak-trace-reference/reference-name.md new file mode 100644 index 0000000000..b4aeb17146 --- /dev/null +++ b/docs/api/shark/shark/-leak-trace-reference/reference-name.md @@ -0,0 +1,5 @@ +[shark](../../index.md) / [shark](../index.md) / [LeakTraceReference](index.md) / [referenceName](./reference-name.md) + +# referenceName + +`val referenceName: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace-reference/reference-type.md b/docs/api/shark/shark/-leak-trace-reference/reference-type.md new file mode 100644 index 0000000000..a6086cddeb --- /dev/null +++ b/docs/api/shark/shark/-leak-trace-reference/reference-type.md @@ -0,0 +1,5 @@ +[shark](../../index.md) / [shark](../index.md) / [LeakTraceReference](index.md) / [referenceType](./reference-type.md) + +# referenceType + +`val referenceType: `[`LeakTraceReference.ReferenceType`](-reference-type/index.md) \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace/-gc-root-type/-j-a-v-a_-f-r-a-m-e.md b/docs/api/shark/shark/-leak-trace/-gc-root-type/-j-a-v-a_-f-r-a-m-e.md new file mode 100644 index 0000000000..f7cade526b --- /dev/null +++ b/docs/api/shark/shark/-leak-trace/-gc-root-type/-j-a-v-a_-f-r-a-m-e.md @@ -0,0 +1,11 @@ +[shark](../../../index.md) / [shark](../../index.md) / [LeakTrace](../index.md) / [GcRootType](index.md) / [JAVA_FRAME](./-j-a-v-a_-f-r-a-m-e.md) + +# JAVA_FRAME + +`JAVA_FRAME` + +### Inherited Properties + +| Name | Summary | +|---|---| +| [description](description.md) | `val description: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | diff --git a/docs/api/shark/shark/-leak-trace/-gc-root-type/-j-n-i_-g-l-o-b-a-l.md b/docs/api/shark/shark/-leak-trace/-gc-root-type/-j-n-i_-g-l-o-b-a-l.md new file mode 100644 index 0000000000..071bee21b8 --- /dev/null +++ b/docs/api/shark/shark/-leak-trace/-gc-root-type/-j-n-i_-g-l-o-b-a-l.md @@ -0,0 +1,11 @@ +[shark](../../../index.md) / [shark](../../index.md) / [LeakTrace](../index.md) / [GcRootType](index.md) / [JNI_GLOBAL](./-j-n-i_-g-l-o-b-a-l.md) + +# JNI_GLOBAL + +`JNI_GLOBAL` + +### Inherited Properties + +| Name | Summary | +|---|---| +| [description](description.md) | `val description: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | diff --git a/docs/api/shark/shark/-leak-trace/-gc-root-type/-j-n-i_-l-o-c-a-l.md b/docs/api/shark/shark/-leak-trace/-gc-root-type/-j-n-i_-l-o-c-a-l.md new file mode 100644 index 0000000000..aacabbe078 --- /dev/null +++ b/docs/api/shark/shark/-leak-trace/-gc-root-type/-j-n-i_-l-o-c-a-l.md @@ -0,0 +1,11 @@ +[shark](../../../index.md) / [shark](../../index.md) / [LeakTrace](../index.md) / [GcRootType](index.md) / [JNI_LOCAL](./-j-n-i_-l-o-c-a-l.md) + +# JNI_LOCAL + +`JNI_LOCAL` + +### Inherited Properties + +| Name | Summary | +|---|---| +| [description](description.md) | `val description: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | diff --git a/docs/api/shark/shark/-leak-trace/-gc-root-type/-j-n-i_-m-o-n-i-t-o-r.md b/docs/api/shark/shark/-leak-trace/-gc-root-type/-j-n-i_-m-o-n-i-t-o-r.md new file mode 100644 index 0000000000..b322d677aa --- /dev/null +++ b/docs/api/shark/shark/-leak-trace/-gc-root-type/-j-n-i_-m-o-n-i-t-o-r.md @@ -0,0 +1,11 @@ +[shark](../../../index.md) / [shark](../../index.md) / [LeakTrace](../index.md) / [GcRootType](index.md) / [JNI_MONITOR](./-j-n-i_-m-o-n-i-t-o-r.md) + +# JNI_MONITOR + +`JNI_MONITOR` + +### Inherited Properties + +| Name | Summary | +|---|---| +| [description](description.md) | `val description: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | diff --git a/docs/api/shark/shark/-leak-trace/-gc-root-type/-m-o-n-i-t-o-r_-u-s-e-d.md b/docs/api/shark/shark/-leak-trace/-gc-root-type/-m-o-n-i-t-o-r_-u-s-e-d.md new file mode 100644 index 0000000000..713cb76daa --- /dev/null +++ b/docs/api/shark/shark/-leak-trace/-gc-root-type/-m-o-n-i-t-o-r_-u-s-e-d.md @@ -0,0 +1,11 @@ +[shark](../../../index.md) / [shark](../../index.md) / [LeakTrace](../index.md) / [GcRootType](index.md) / [MONITOR_USED](./-m-o-n-i-t-o-r_-u-s-e-d.md) + +# MONITOR_USED + +`MONITOR_USED` + +### Inherited Properties + +| Name | Summary | +|---|---| +| [description](description.md) | `val description: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | diff --git a/docs/api/shark/shark/-leak-trace/-gc-root-type/-n-a-t-i-v-e_-s-t-a-c-k.md b/docs/api/shark/shark/-leak-trace/-gc-root-type/-n-a-t-i-v-e_-s-t-a-c-k.md new file mode 100644 index 0000000000..7eac51893a --- /dev/null +++ b/docs/api/shark/shark/-leak-trace/-gc-root-type/-n-a-t-i-v-e_-s-t-a-c-k.md @@ -0,0 +1,11 @@ +[shark](../../../index.md) / [shark](../../index.md) / [LeakTrace](../index.md) / [GcRootType](index.md) / [NATIVE_STACK](./-n-a-t-i-v-e_-s-t-a-c-k.md) + +# NATIVE_STACK + +`NATIVE_STACK` + +### Inherited Properties + +| Name | Summary | +|---|---| +| [description](description.md) | `val description: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | diff --git a/docs/api/shark/shark/-leak-trace/-gc-root-type/-s-t-i-c-k-y_-c-l-a-s-s.md b/docs/api/shark/shark/-leak-trace/-gc-root-type/-s-t-i-c-k-y_-c-l-a-s-s.md new file mode 100644 index 0000000000..bf87ff259e --- /dev/null +++ b/docs/api/shark/shark/-leak-trace/-gc-root-type/-s-t-i-c-k-y_-c-l-a-s-s.md @@ -0,0 +1,11 @@ +[shark](../../../index.md) / [shark](../../index.md) / [LeakTrace](../index.md) / [GcRootType](index.md) / [STICKY_CLASS](./-s-t-i-c-k-y_-c-l-a-s-s.md) + +# STICKY_CLASS + +`STICKY_CLASS` + +### Inherited Properties + +| Name | Summary | +|---|---| +| [description](description.md) | `val description: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | diff --git a/docs/api/shark/shark/-leak-trace/-gc-root-type/-t-h-r-e-a-d_-b-l-o-c-k.md b/docs/api/shark/shark/-leak-trace/-gc-root-type/-t-h-r-e-a-d_-b-l-o-c-k.md new file mode 100644 index 0000000000..5cd9ac649e --- /dev/null +++ b/docs/api/shark/shark/-leak-trace/-gc-root-type/-t-h-r-e-a-d_-b-l-o-c-k.md @@ -0,0 +1,11 @@ +[shark](../../../index.md) / [shark](../../index.md) / [LeakTrace](../index.md) / [GcRootType](index.md) / [THREAD_BLOCK](./-t-h-r-e-a-d_-b-l-o-c-k.md) + +# THREAD_BLOCK + +`THREAD_BLOCK` + +### Inherited Properties + +| Name | Summary | +|---|---| +| [description](description.md) | `val description: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | diff --git a/docs/api/shark/shark/-leak-trace/-gc-root-type/-t-h-r-e-a-d_-o-b-j-e-c-t.md b/docs/api/shark/shark/-leak-trace/-gc-root-type/-t-h-r-e-a-d_-o-b-j-e-c-t.md new file mode 100644 index 0000000000..c0150cc5fb --- /dev/null +++ b/docs/api/shark/shark/-leak-trace/-gc-root-type/-t-h-r-e-a-d_-o-b-j-e-c-t.md @@ -0,0 +1,11 @@ +[shark](../../../index.md) / [shark](../../index.md) / [LeakTrace](../index.md) / [GcRootType](index.md) / [THREAD_OBJECT](./-t-h-r-e-a-d_-o-b-j-e-c-t.md) + +# THREAD_OBJECT + +`THREAD_OBJECT` + +### Inherited Properties + +| Name | Summary | +|---|---| +| [description](description.md) | `val description: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | diff --git a/docs/api/shark/shark/-leak-trace/-gc-root-type/description.md b/docs/api/shark/shark/-leak-trace/-gc-root-type/description.md new file mode 100644 index 0000000000..eadfdc5993 --- /dev/null +++ b/docs/api/shark/shark/-leak-trace/-gc-root-type/description.md @@ -0,0 +1,5 @@ +[shark](../../../index.md) / [shark](../../index.md) / [LeakTrace](../index.md) / [GcRootType](index.md) / [description](./description.md) + +# description + +`val description: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace/-gc-root-type/from-gc-root.md b/docs/api/shark/shark/-leak-trace/-gc-root-type/from-gc-root.md new file mode 100644 index 0000000000..be80e0b2c2 --- /dev/null +++ b/docs/api/shark/shark/-leak-trace/-gc-root-type/from-gc-root.md @@ -0,0 +1,5 @@ +[shark](../../../index.md) / [shark](../../index.md) / [LeakTrace](../index.md) / [GcRootType](index.md) / [fromGcRoot](./from-gc-root.md) + +# fromGcRoot + +`fun fromGcRoot(gcRoot: GcRoot): `[`LeakTrace.GcRootType`](index.md) \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace/-gc-root-type/index.md b/docs/api/shark/shark/-leak-trace/-gc-root-type/index.md new file mode 100644 index 0000000000..2f8b22df7d --- /dev/null +++ b/docs/api/shark/shark/-leak-trace/-gc-root-type/index.md @@ -0,0 +1,31 @@ +[shark](../../../index.md) / [shark](../../index.md) / [LeakTrace](../index.md) / [GcRootType](./index.md) + +# GcRootType + +`enum class GcRootType` + +### Enum Values + +| Name | Summary | +|---|---| +| [JNI_GLOBAL](-j-n-i_-g-l-o-b-a-l.md) | | +| [JNI_LOCAL](-j-n-i_-l-o-c-a-l.md) | | +| [JAVA_FRAME](-j-a-v-a_-f-r-a-m-e.md) | | +| [NATIVE_STACK](-n-a-t-i-v-e_-s-t-a-c-k.md) | | +| [STICKY_CLASS](-s-t-i-c-k-y_-c-l-a-s-s.md) | | +| [THREAD_BLOCK](-t-h-r-e-a-d_-b-l-o-c-k.md) | | +| [MONITOR_USED](-m-o-n-i-t-o-r_-u-s-e-d.md) | | +| [THREAD_OBJECT](-t-h-r-e-a-d_-o-b-j-e-c-t.md) | | +| [JNI_MONITOR](-j-n-i_-m-o-n-i-t-o-r.md) | | + +### Properties + +| Name | Summary | +|---|---| +| [description](description.md) | `val description: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | + +### Companion Object Functions + +| Name | Summary | +|---|---| +| [fromGcRoot](from-gc-root.md) | `fun fromGcRoot(gcRoot: GcRoot): `[`LeakTrace.GcRootType`](./index.md) | diff --git a/docs/api/shark/shark/-leak-trace/-init-.md b/docs/api/shark/shark/-leak-trace/-init-.md index 6dbe2091c5..71acd33c72 100644 --- a/docs/api/shark/shark/-leak-trace/-init-.md +++ b/docs/api/shark/shark/-leak-trace/-init-.md @@ -2,8 +2,14 @@ # <init> -`LeakTrace(elements: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`LeakTraceElement`](../-leak-trace-element/index.md)`>)` - -A chain of references that constitute the shortest strong reference path from a GC root to the -leaking object. Fixing the leak usually means breaking one of the references in that chain. +`LeakTrace(gcRootType: `[`LeakTrace.GcRootType`](-gc-root-type/index.md)`, referencePath: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`LeakTraceReference`](../-leak-trace-reference/index.md)`>, leakingObject: `[`LeakTraceObject`](../-leak-trace-object/index.md)`, retainedHeapByteSize: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?)` + +The best strong reference path from a GC root to the leaking object. "Best" here means the +shortest prioritized path. A large number of distinct paths can generally be found leading +to a leaking object. Shark prioritizes paths that don't go through known +[LibraryLeakReferenceMatcher](../-library-leak-reference-matcher/index.md) (because those are known to create leaks so it's more interesting +to find other paths causing leaks), then it prioritize paths that don't go through java local +gc roots (because those are harder to reason about). Taking those priorities into account, +finding the shortest path means there are less [LeakTraceReference](../-leak-trace-reference/index.md) that can be suspected to +cause the leak. diff --git a/docs/api/shark/shark/-leak-trace/element-may-be-leak-cause.md b/docs/api/shark/shark/-leak-trace/element-may-be-leak-cause.md deleted file mode 100644 index 36fb3527bc..0000000000 --- a/docs/api/shark/shark/-leak-trace/element-may-be-leak-cause.md +++ /dev/null @@ -1,5 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [LeakTrace](index.md) / [elementMayBeLeakCause](./element-may-be-leak-cause.md) - -# elementMayBeLeakCause - -`fun elementMayBeLeakCause(index: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace/elements.md b/docs/api/shark/shark/-leak-trace/elements.md deleted file mode 100644 index fc287bd335..0000000000 --- a/docs/api/shark/shark/-leak-trace/elements.md +++ /dev/null @@ -1,5 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [LeakTrace](index.md) / [elements](./elements.md) - -# elements - -`val elements: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`LeakTraceElement`](../-leak-trace-element/index.md)`>` \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace/gc-root-type.md b/docs/api/shark/shark/-leak-trace/gc-root-type.md new file mode 100644 index 0000000000..c69d6d2803 --- /dev/null +++ b/docs/api/shark/shark/-leak-trace/gc-root-type.md @@ -0,0 +1,9 @@ +[shark](../../index.md) / [shark](../index.md) / [LeakTrace](index.md) / [gcRootType](./gc-root-type.md) + +# gcRootType + +`val gcRootType: `[`LeakTrace.GcRootType`](-gc-root-type/index.md) + +The Garbage Collection root that references the [LeakTraceReference.originObject](../-leak-trace-reference/origin-object.md) in +the first [LeakTraceReference](../-leak-trace-reference/index.md) of [referencePath](reference-path.md). + diff --git a/docs/api/shark/shark/-leak-trace/index.md b/docs/api/shark/shark/-leak-trace/index.md index c7d58df202..8722e48a0a 100644 --- a/docs/api/shark/shark/-leak-trace/index.md +++ b/docs/api/shark/shark/-leak-trace/index.md @@ -4,25 +4,42 @@ `data class LeakTrace : `[`Serializable`](https://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html) -A chain of references that constitute the shortest strong reference path from a GC root to the -leaking object. Fixing the leak usually means breaking one of the references in that chain. +The best strong reference path from a GC root to the leaking object. "Best" here means the +shortest prioritized path. A large number of distinct paths can generally be found leading +to a leaking object. Shark prioritizes paths that don't go through known +[LibraryLeakReferenceMatcher](../-library-leak-reference-matcher/index.md) (because those are known to create leaks so it's more interesting +to find other paths causing leaks), then it prioritize paths that don't go through java local +gc roots (because those are harder to reason about). Taking those priorities into account, +finding the shortest path means there are less [LeakTraceReference](../-leak-trace-reference/index.md) that can be suspected to +cause the leak. + +### Types + +| Name | Summary | +|---|---| +| [GcRootType](-gc-root-type/index.md) | `enum class GcRootType` | ### Constructors | Name | Summary | |---|---| -| [<init>](-init-.md) | `LeakTrace(elements: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`LeakTraceElement`](../-leak-trace-element/index.md)`>)`
A chain of references that constitute the shortest strong reference path from a GC root to the leaking object. Fixing the leak usually means breaking one of the references in that chain. | +| [<init>](-init-.md) | `LeakTrace(gcRootType: `[`LeakTrace.GcRootType`](-gc-root-type/index.md)`, referencePath: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`LeakTraceReference`](../-leak-trace-reference/index.md)`>, leakingObject: `[`LeakTraceObject`](../-leak-trace-object/index.md)`, retainedHeapByteSize: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?)`
The best strong reference path from a GC root to the leaking object. "Best" here means the shortest prioritized path. A large number of distinct paths can generally be found leading to a leaking object. Shark prioritizes paths that don't go through known [LibraryLeakReferenceMatcher](../-library-leak-reference-matcher/index.md) (because those are known to create leaks so it's more interesting to find other paths causing leaks), then it prioritize paths that don't go through java local gc roots (because those are harder to reason about). Taking those priorities into account, finding the shortest path means there are less [LeakTraceReference](../-leak-trace-reference/index.md) that can be suspected to cause the leak. | ### Properties | Name | Summary | |---|---| -| [elements](elements.md) | `val elements: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`LeakTraceElement`](../-leak-trace-element/index.md)`>` | -| [leakCauses](leak-causes.md) | `val leakCauses: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`LeakTraceElement`](../-leak-trace-element/index.md)`>` | +| [gcRootType](gc-root-type.md) | `val gcRootType: `[`LeakTrace.GcRootType`](-gc-root-type/index.md)
The Garbage Collection root that references the [LeakTraceReference.originObject](../-leak-trace-reference/origin-object.md) in the first [LeakTraceReference](../-leak-trace-reference/index.md) of [referencePath](reference-path.md). | +| [leakingObject](leaking-object.md) | `val leakingObject: `[`LeakTraceObject`](../-leak-trace-object/index.md) | +| [referencePath](reference-path.md) | `val referencePath: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`LeakTraceReference`](../-leak-trace-reference/index.md)`>` | +| [retainedHeapByteSize](retained-heap-byte-size.md) | `val retainedHeapByteSize: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?`
The minimum number of bytes which would be freed if all references to the leaking object were released. Null if the retained heap size was not computed. | +| [signature](signature.md) | `val signature: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
A SHA1 hash that represents this leak trace. This can be useful to group together similar leak traces. | +| [suspectReferenceSubpath](suspect-reference-subpath.md) | `val suspectReferenceSubpath: `[`Sequence`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/-sequence/index.html)`<`[`LeakTraceReference`](../-leak-trace-reference/index.md)`>`
A part of [referencePath](reference-path.md) that contains the references suspected to cause the leak. Starts at the last non leaking object and ends before the first leaking object. | ### Functions | Name | Summary | |---|---| -| [elementMayBeLeakCause](element-may-be-leak-cause.md) | `fun elementMayBeLeakCause(index: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | +| [referencePathElementIsSuspect](reference-path-element-is-suspect.md) | `fun referencePathElementIsSuspect(index: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)
Returns true if the [referencePath](reference-path.md) element at the provided [index](reference-path-element-is-suspect.md#shark.LeakTrace$referencePathElementIsSuspect(kotlin.Int)/index) contains a reference that is suspected to cause the leak, ie if [index](reference-path-element-is-suspect.md#shark.LeakTrace$referencePathElementIsSuspect(kotlin.Int)/index) is greater than or equal to the index of the [LeakTraceReference](../-leak-trace-reference/index.md) of the last non leaking object and strictly lower than the index of the [LeakTraceReference](../-leak-trace-reference/index.md) of the first leaking object. | +| [toSimplePathString](to-simple-path-string.md) | `fun toSimplePathString(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | | [toString](to-string.md) | `fun toString(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | diff --git a/docs/api/shark/shark/-leak-trace/leak-causes.md b/docs/api/shark/shark/-leak-trace/leak-causes.md deleted file mode 100644 index 33569b8a61..0000000000 --- a/docs/api/shark/shark/-leak-trace/leak-causes.md +++ /dev/null @@ -1,5 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [LeakTrace](index.md) / [leakCauses](./leak-causes.md) - -# leakCauses - -`val leakCauses: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`LeakTraceElement`](../-leak-trace-element/index.md)`>` \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace/leaking-object.md b/docs/api/shark/shark/-leak-trace/leaking-object.md new file mode 100644 index 0000000000..68d793d96d --- /dev/null +++ b/docs/api/shark/shark/-leak-trace/leaking-object.md @@ -0,0 +1,5 @@ +[shark](../../index.md) / [shark](../index.md) / [LeakTrace](index.md) / [leakingObject](./leaking-object.md) + +# leakingObject + +`val leakingObject: `[`LeakTraceObject`](../-leak-trace-object/index.md) \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace/reference-path-element-is-suspect.md b/docs/api/shark/shark/-leak-trace/reference-path-element-is-suspect.md new file mode 100644 index 0000000000..a4019c4c0b --- /dev/null +++ b/docs/api/shark/shark/-leak-trace/reference-path-element-is-suspect.md @@ -0,0 +1,11 @@ +[shark](../../index.md) / [shark](../index.md) / [LeakTrace](index.md) / [referencePathElementIsSuspect](./reference-path-element-is-suspect.md) + +# referencePathElementIsSuspect + +`fun referencePathElementIsSuspect(index: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) + +Returns true if the [referencePath](reference-path.md) element at the provided [index](reference-path-element-is-suspect.md#shark.LeakTrace$referencePathElementIsSuspect(kotlin.Int)/index) contains a reference +that is suspected to cause the leak, ie if [index](reference-path-element-is-suspect.md#shark.LeakTrace$referencePathElementIsSuspect(kotlin.Int)/index) is greater than or equal to the index +of the [LeakTraceReference](../-leak-trace-reference/index.md) of the last non leaking object and strictly lower than the index +of the [LeakTraceReference](../-leak-trace-reference/index.md) of the first leaking object. + diff --git a/docs/api/shark/shark/-leak-trace/reference-path.md b/docs/api/shark/shark/-leak-trace/reference-path.md new file mode 100644 index 0000000000..992763b684 --- /dev/null +++ b/docs/api/shark/shark/-leak-trace/reference-path.md @@ -0,0 +1,5 @@ +[shark](../../index.md) / [shark](../index.md) / [LeakTrace](index.md) / [referencePath](./reference-path.md) + +# referencePath + +`val referencePath: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`LeakTraceReference`](../-leak-trace-reference/index.md)`>` \ No newline at end of file diff --git a/docs/api/shark/shark/-leak-trace/retained-heap-byte-size.md b/docs/api/shark/shark/-leak-trace/retained-heap-byte-size.md new file mode 100644 index 0000000000..83400a5469 --- /dev/null +++ b/docs/api/shark/shark/-leak-trace/retained-heap-byte-size.md @@ -0,0 +1,9 @@ +[shark](../../index.md) / [shark](../index.md) / [LeakTrace](index.md) / [retainedHeapByteSize](./retained-heap-byte-size.md) + +# retainedHeapByteSize + +`val retainedHeapByteSize: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?` + +The minimum number of bytes which would be freed if all references to the leaking object were +released. Null if the retained heap size was not computed. + diff --git a/docs/api/shark/shark/-leak-trace/signature.md b/docs/api/shark/shark/-leak-trace/signature.md new file mode 100644 index 0000000000..c5bfb1003a --- /dev/null +++ b/docs/api/shark/shark/-leak-trace/signature.md @@ -0,0 +1,11 @@ +[shark](../../index.md) / [shark](../index.md) / [LeakTrace](index.md) / [signature](./signature.md) + +# signature + +`val signature: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) + +A SHA1 hash that represents this leak trace. This can be useful to group together similar +leak traces. + +The signature is a hash of [suspectReferenceSubpath](suspect-reference-subpath.md). + diff --git a/docs/api/shark/shark/-leak-trace/suspect-reference-subpath.md b/docs/api/shark/shark/-leak-trace/suspect-reference-subpath.md new file mode 100644 index 0000000000..47b15e2d74 --- /dev/null +++ b/docs/api/shark/shark/-leak-trace/suspect-reference-subpath.md @@ -0,0 +1,9 @@ +[shark](../../index.md) / [shark](../index.md) / [LeakTrace](index.md) / [suspectReferenceSubpath](./suspect-reference-subpath.md) + +# suspectReferenceSubpath + +`val suspectReferenceSubpath: `[`Sequence`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/-sequence/index.html)`<`[`LeakTraceReference`](../-leak-trace-reference/index.md)`>` + +A part of [referencePath](reference-path.md) that contains the references suspected to cause the leak. +Starts at the last non leaking object and ends before the first leaking object. + diff --git a/docs/api/shark/shark/-leak-trace/to-simple-path-string.md b/docs/api/shark/shark/-leak-trace/to-simple-path-string.md new file mode 100644 index 0000000000..9af54c9831 --- /dev/null +++ b/docs/api/shark/shark/-leak-trace/to-simple-path-string.md @@ -0,0 +1,5 @@ +[shark](../../index.md) / [shark](../index.md) / [LeakTrace](index.md) / [toSimplePathString](./to-simple-path-string.md) + +# toSimplePathString + +`fun toSimplePathString(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) \ No newline at end of file diff --git a/docs/api/shark/shark/-leak/class-name.md b/docs/api/shark/shark/-leak/class-name.md deleted file mode 100644 index 8b40e2b3a2..0000000000 --- a/docs/api/shark/shark/-leak/class-name.md +++ /dev/null @@ -1,9 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [Leak](index.md) / [className](./class-name.md) - -# className - -`abstract val className: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) - -Class name of the leaking object. -The class name format is the same as what would be returned by [Class.getName](https://docs.oracle.com/javase/6/docs/api/java/lang/Class.html#getName()). - diff --git a/docs/api/shark/shark/-leak/class-simple-name.md b/docs/api/shark/shark/-leak/class-simple-name.md deleted file mode 100644 index 717f776dd3..0000000000 --- a/docs/api/shark/shark/-leak/class-simple-name.md +++ /dev/null @@ -1,8 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [Leak](index.md) / [classSimpleName](./class-simple-name.md) - -# classSimpleName - -`val classSimpleName: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) - -Returns [className](class-name.md) stripped of any string content before the last period (included). - diff --git a/docs/api/shark/shark/-leak/create-group-hash.md b/docs/api/shark/shark/-leak/create-group-hash.md deleted file mode 100644 index 324616cee0..0000000000 --- a/docs/api/shark/shark/-leak/create-group-hash.md +++ /dev/null @@ -1,5 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [Leak](index.md) / [createGroupHash](./create-group-hash.md) - -# createGroupHash - -`protected abstract fun createGroupHash(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) \ No newline at end of file diff --git a/docs/api/shark/shark/-leak/group-hash.md b/docs/api/shark/shark/-leak/group-hash.md deleted file mode 100644 index 1cf68acc9d..0000000000 --- a/docs/api/shark/shark/-leak/group-hash.md +++ /dev/null @@ -1,11 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [Leak](index.md) / [groupHash](./group-hash.md) - -# groupHash - -`val groupHash: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) - -A unique SHA1 hash that represents this group of leaks. - -For [ApplicationLeak](../-application-leak/index.md) this is based on [LeakTrace.leakCauses](../-leak-trace/leak-causes.md) and for [LibraryLeak](../-library-leak/index.md) this is -based on [LibraryLeak.pattern](../-library-leak/pattern.md). - diff --git a/docs/api/shark/shark/-leak/index.md b/docs/api/shark/shark/-leak/index.md index 7cbf0225db..b34816ec71 100644 --- a/docs/api/shark/shark/-leak/index.md +++ b/docs/api/shark/shark/-leak/index.md @@ -10,17 +10,15 @@ A leak found by [HeapAnalyzer](../-heap-analyzer/index.md), either an [Applicati | Name | Summary | |---|---| -| [className](class-name.md) | `abstract val className: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
Class name of the leaking object. The class name format is the same as what would be returned by [Class.getName](https://docs.oracle.com/javase/6/docs/api/java/lang/Class.html#getName()). | -| [classSimpleName](class-simple-name.md) | `val classSimpleName: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
Returns [className](class-name.md) stripped of any string content before the last period (included). | -| [groupHash](group-hash.md) | `val groupHash: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
A unique SHA1 hash that represents this group of leaks. | -| [leakTrace](leak-trace.md) | `abstract val leakTrace: `[`LeakTrace`](../-leak-trace/index.md)
Shortest path from GC roots to the leaking object. | -| [retainedHeapByteSize](retained-heap-byte-size.md) | `abstract val retainedHeapByteSize: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?`
The number of bytes which would be freed if all references to the leaking object were released. Null if the retained heap size was not computed. | +| [leakTraces](leak-traces.md) | `abstract val leakTraces: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`LeakTrace`](../-leak-trace/index.md)`>`
Group of leak traces which share the same leak signature. | +| [shortDescription](short-description.md) | `abstract val shortDescription: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | +| [signature](signature.md) | `abstract val signature: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
A unique SHA1 hash that represents this group of leak traces. | +| [totalRetainedHeapByteSize](total-retained-heap-byte-size.md) | `val totalRetainedHeapByteSize: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?`
Sum of [LeakTrace.retainedHeapByteSize](../-leak-trace/retained-heap-byte-size.md) for all elements in [leakTraces](leak-traces.md). Null if the retained heap size was not computed. | ### Functions | Name | Summary | |---|---| -| [createGroupHash](create-group-hash.md) | `abstract fun createGroupHash(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | | [toString](to-string.md) | `open fun toString(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | ### Inheritors diff --git a/docs/api/shark/shark/-leak/leak-trace.md b/docs/api/shark/shark/-leak/leak-trace.md deleted file mode 100644 index 589aa93a6e..0000000000 --- a/docs/api/shark/shark/-leak/leak-trace.md +++ /dev/null @@ -1,8 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [Leak](index.md) / [leakTrace](./leak-trace.md) - -# leakTrace - -`abstract val leakTrace: `[`LeakTrace`](../-leak-trace/index.md) - -Shortest path from GC roots to the leaking object. - diff --git a/docs/api/shark/shark/-leak/leak-traces.md b/docs/api/shark/shark/-leak/leak-traces.md new file mode 100644 index 0000000000..1cadb826e4 --- /dev/null +++ b/docs/api/shark/shark/-leak/leak-traces.md @@ -0,0 +1,8 @@ +[shark](../../index.md) / [shark](../index.md) / [Leak](index.md) / [leakTraces](./leak-traces.md) + +# leakTraces + +`abstract val leakTraces: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`LeakTrace`](../-leak-trace/index.md)`>` + +Group of leak traces which share the same leak signature. + diff --git a/docs/api/shark/shark/-leak/retained-heap-byte-size.md b/docs/api/shark/shark/-leak/retained-heap-byte-size.md deleted file mode 100644 index a384f3776d..0000000000 --- a/docs/api/shark/shark/-leak/retained-heap-byte-size.md +++ /dev/null @@ -1,9 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [Leak](index.md) / [retainedHeapByteSize](./retained-heap-byte-size.md) - -# retainedHeapByteSize - -`abstract val retainedHeapByteSize: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?` - -The number of bytes which would be freed if all references to the leaking object were -released. Null if the retained heap size was not computed. - diff --git a/docs/api/shark/shark/-leak/short-description.md b/docs/api/shark/shark/-leak/short-description.md new file mode 100644 index 0000000000..73478acbc3 --- /dev/null +++ b/docs/api/shark/shark/-leak/short-description.md @@ -0,0 +1,5 @@ +[shark](../../index.md) / [shark](../index.md) / [Leak](index.md) / [shortDescription](./short-description.md) + +# shortDescription + +`abstract val shortDescription: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) \ No newline at end of file diff --git a/docs/api/shark/shark/-leak/signature.md b/docs/api/shark/shark/-leak/signature.md new file mode 100644 index 0000000000..e46486219b --- /dev/null +++ b/docs/api/shark/shark/-leak/signature.md @@ -0,0 +1,11 @@ +[shark](../../index.md) / [shark](../index.md) / [Leak](index.md) / [signature](./signature.md) + +# signature + +`abstract val signature: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) + +A unique SHA1 hash that represents this group of leak traces. + +For [ApplicationLeak](../-application-leak/index.md) this is based on [LeakTrace.signature](../-leak-trace/signature.md) and for [LibraryLeak](../-library-leak/index.md) this is +based on [LibraryLeak.pattern](../-library-leak/pattern.md). + diff --git a/docs/api/shark/shark/-leak/total-retained-heap-byte-size.md b/docs/api/shark/shark/-leak/total-retained-heap-byte-size.md new file mode 100644 index 0000000000..923a3bfc74 --- /dev/null +++ b/docs/api/shark/shark/-leak/total-retained-heap-byte-size.md @@ -0,0 +1,9 @@ +[shark](../../index.md) / [shark](../index.md) / [Leak](index.md) / [totalRetainedHeapByteSize](./total-retained-heap-byte-size.md) + +# totalRetainedHeapByteSize + +`val totalRetainedHeapByteSize: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?` + +Sum of [LeakTrace.retainedHeapByteSize](../-leak-trace/retained-heap-byte-size.md) for all elements in [leakTraces](leak-traces.md). +Null if the retained heap size was not computed. + diff --git a/docs/api/shark/shark/-leaking-object-finder/find-leaking-object-ids.md b/docs/api/shark/shark/-leaking-object-finder/find-leaking-object-ids.md new file mode 100644 index 0000000000..efbb70eb64 --- /dev/null +++ b/docs/api/shark/shark/-leaking-object-finder/find-leaking-object-ids.md @@ -0,0 +1,8 @@ +[shark](../../index.md) / [shark](../index.md) / [LeakingObjectFinder](index.md) / [findLeakingObjectIds](./find-leaking-object-ids.md) + +# findLeakingObjectIds + +`abstract fun findLeakingObjectIds(graph: HeapGraph): `[`Set`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`<`[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`>` + +For a given heap graph, returns a set of object ids for the objects that are leaking. + diff --git a/docs/api/shark/shark/-leaking-object-finder/index.md b/docs/api/shark/shark/-leaking-object-finder/index.md new file mode 100644 index 0000000000..cd7d102c6b --- /dev/null +++ b/docs/api/shark/shark/-leaking-object-finder/index.md @@ -0,0 +1,29 @@ +[shark](../../index.md) / [shark](../index.md) / [LeakingObjectFinder](./index.md) + +# LeakingObjectFinder + +`interface LeakingObjectFinder` + +Finds the objects that are leaking, for which Shark will compute +leak traces. + +You can create a [LeakingObjectFinder](./index.md) from a lambda by calling [invoke](invoke.md). + +### Functions + +| Name | Summary | +|---|---| +| [findLeakingObjectIds](find-leaking-object-ids.md) | `abstract fun findLeakingObjectIds(graph: HeapGraph): `[`Set`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`<`[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`>`
For a given heap graph, returns a set of object ids for the objects that are leaking. | + +### Companion Object Functions + +| Name | Summary | +|---|---| +| [invoke](invoke.md) | `operator fun invoke(block: (HeapGraph) -> `[`Set`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`<`[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`>): `[`LeakingObjectFinder`](./index.md)
Utility function to create a [LeakingObjectFinder](./index.md) from the passed in [block](invoke.md#shark.LeakingObjectFinder.Companion$invoke(kotlin.Function1((shark.HeapGraph, kotlin.collections.Set((kotlin.Long)))))/block) lambda instead of using the anonymous `object : LeakingObjectFinder` syntax. | + +### Inheritors + +| Name | Summary | +|---|---| +| [FilteringLeakingObjectFinder](../-filtering-leaking-object-finder/index.md) | `class FilteringLeakingObjectFinder : `[`LeakingObjectFinder`](./index.md)
Finds the objects that are leaking by scanning all objects in the heap dump and delegating the decision to a list of [FilteringLeakingObjectFinder.LeakingObjectFilter](../-filtering-leaking-object-finder/-leaking-object-filter/index.md) | +| [KeyedWeakReferenceFinder](../-keyed-weak-reference-finder/index.md) | `object KeyedWeakReferenceFinder : `[`LeakingObjectFinder`](./index.md)
Finds all objects tracked by a KeyedWeakReference, ie all objects that were passed to ObjectWatcher.watch. | diff --git a/docs/api/shark/shark/-leaking-object-finder/invoke.md b/docs/api/shark/shark/-leaking-object-finder/invoke.md new file mode 100644 index 0000000000..39e19d0d4e --- /dev/null +++ b/docs/api/shark/shark/-leaking-object-finder/invoke.md @@ -0,0 +1,17 @@ +[shark](../../index.md) / [shark](../index.md) / [LeakingObjectFinder](index.md) / [invoke](./invoke.md) + +# invoke + +`inline operator fun invoke(crossinline block: (HeapGraph) -> `[`Set`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`<`[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`>): `[`LeakingObjectFinder`](index.md) + +Utility function to create a [LeakingObjectFinder](index.md) from the passed in [block](invoke.md#shark.LeakingObjectFinder.Companion$invoke(kotlin.Function1((shark.HeapGraph, kotlin.collections.Set((kotlin.Long)))))/block) lambda +instead of using the anonymous `object : LeakingObjectFinder` syntax. + +Usage: + +``` kotlin +val listener = LeakingObjectFinder { + +} +``` + diff --git a/docs/api/shark/shark/-library-leak/-init-.md b/docs/api/shark/shark/-library-leak/-init-.md index 8702aea397..a9aa2c2daf 100644 --- a/docs/api/shark/shark/-library-leak/-init-.md +++ b/docs/api/shark/shark/-library-leak/-init-.md @@ -2,7 +2,7 @@ # <init> -`LibraryLeak(className: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, leakTrace: `[`LeakTrace`](../-leak-trace/index.md)`, retainedHeapByteSize: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?, pattern: `[`ReferencePattern`](../-reference-pattern/index.md)`, description: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` +`LibraryLeak(leakTraces: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`LeakTrace`](../-leak-trace/index.md)`>, pattern: `[`ReferencePattern`](../-reference-pattern/index.md)`, description: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` A leak found by [HeapAnalyzer](../-heap-analyzer/index.md), where the only path to the leaking object required going through a reference matched by [pattern](pattern.md), as provided to a [LibraryLeakReferenceMatcher](../-library-leak-reference-matcher/index.md) diff --git a/docs/api/shark/shark/-library-leak/create-group-hash.md b/docs/api/shark/shark/-library-leak/create-group-hash.md deleted file mode 100644 index daccfae3c8..0000000000 --- a/docs/api/shark/shark/-library-leak/create-group-hash.md +++ /dev/null @@ -1,8 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [LibraryLeak](index.md) / [createGroupHash](./create-group-hash.md) - -# createGroupHash - -`protected fun createGroupHash(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) - -Overrides [Leak.createGroupHash](../-leak/create-group-hash.md) - diff --git a/docs/api/shark/shark/-library-leak/index.md b/docs/api/shark/shark/-library-leak/index.md index c8162dbba6..eb773421ff 100644 --- a/docs/api/shark/shark/-library-leak/index.md +++ b/docs/api/shark/shark/-library-leak/index.md @@ -12,28 +12,26 @@ instance. This is a known leak in library code that is beyond your control. | Name | Summary | |---|---| -| [<init>](-init-.md) | `LibraryLeak(className: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, leakTrace: `[`LeakTrace`](../-leak-trace/index.md)`, retainedHeapByteSize: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?, pattern: `[`ReferencePattern`](../-reference-pattern/index.md)`, description: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)`
A leak found by [HeapAnalyzer](../-heap-analyzer/index.md), where the only path to the leaking object required going through a reference matched by [pattern](pattern.md), as provided to a [LibraryLeakReferenceMatcher](../-library-leak-reference-matcher/index.md) instance. This is a known leak in library code that is beyond your control. | +| [<init>](-init-.md) | `LibraryLeak(leakTraces: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`LeakTrace`](../-leak-trace/index.md)`>, pattern: `[`ReferencePattern`](../-reference-pattern/index.md)`, description: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)`
A leak found by [HeapAnalyzer](../-heap-analyzer/index.md), where the only path to the leaking object required going through a reference matched by [pattern](pattern.md), as provided to a [LibraryLeakReferenceMatcher](../-library-leak-reference-matcher/index.md) instance. This is a known leak in library code that is beyond your control. | ### Properties | Name | Summary | |---|---| -| [className](class-name.md) | `val className: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
Class name of the leaking object. The class name format is the same as what would be returned by [Class.getName](https://docs.oracle.com/javase/6/docs/api/java/lang/Class.html#getName()). | | [description](description.md) | `val description: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
A description that conveys what we know about this library leak. | -| [leakTrace](leak-trace.md) | `val leakTrace: `[`LeakTrace`](../-leak-trace/index.md)
Shortest path from GC roots to the leaking object. | -| [pattern](pattern.md) | `val pattern: `[`ReferencePattern`](../-reference-pattern/index.md)
The pattern that matched one of the references in [leakTrace](leak-trace.md), as provided to a [LibraryLeakReferenceMatcher](../-library-leak-reference-matcher/index.md) instance. | -| [retainedHeapByteSize](retained-heap-byte-size.md) | `val retainedHeapByteSize: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?`
The number of bytes which would be freed if all references to the leaking object were released. Null if the retained heap size was not computed. | +| [leakTraces](leak-traces.md) | `val leakTraces: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`LeakTrace`](../-leak-trace/index.md)`>`
Group of leak traces which share the same leak signature. | +| [pattern](pattern.md) | `val pattern: `[`ReferencePattern`](../-reference-pattern/index.md)
The pattern that matched one of the references in each of [leakTraces](leak-traces.md), as provided to a [LibraryLeakReferenceMatcher](../-library-leak-reference-matcher/index.md) instance. | +| [shortDescription](short-description.md) | `val shortDescription: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | +| [signature](signature.md) | `val signature: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
A unique SHA1 hash that represents this group of leak traces. | ### Inherited Properties | Name | Summary | |---|---| -| [classSimpleName](../-leak/class-simple-name.md) | `val classSimpleName: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
Returns [className](../-leak/class-name.md) stripped of any string content before the last period (included). | -| [groupHash](../-leak/group-hash.md) | `val groupHash: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
A unique SHA1 hash that represents this group of leaks. | +| [totalRetainedHeapByteSize](../-leak/total-retained-heap-byte-size.md) | `val totalRetainedHeapByteSize: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?`
Sum of [LeakTrace.retainedHeapByteSize](../-leak-trace/retained-heap-byte-size.md) for all elements in [leakTraces](../-leak/leak-traces.md). Null if the retained heap size was not computed. | ### Functions | Name | Summary | |---|---| -| [createGroupHash](create-group-hash.md) | `fun createGroupHash(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | | [toString](to-string.md) | `fun toString(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | diff --git a/docs/api/shark/shark/-library-leak/leak-trace.md b/docs/api/shark/shark/-library-leak/leak-trace.md deleted file mode 100644 index e2a171544d..0000000000 --- a/docs/api/shark/shark/-library-leak/leak-trace.md +++ /dev/null @@ -1,10 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [LibraryLeak](index.md) / [leakTrace](./leak-trace.md) - -# leakTrace - -`val leakTrace: `[`LeakTrace`](../-leak-trace/index.md) - -Overrides [Leak.leakTrace](../-leak/leak-trace.md) - -Shortest path from GC roots to the leaking object. - diff --git a/docs/api/shark/shark/-library-leak/leak-traces.md b/docs/api/shark/shark/-library-leak/leak-traces.md new file mode 100644 index 0000000000..b192d9073a --- /dev/null +++ b/docs/api/shark/shark/-library-leak/leak-traces.md @@ -0,0 +1,10 @@ +[shark](../../index.md) / [shark](../index.md) / [LibraryLeak](index.md) / [leakTraces](./leak-traces.md) + +# leakTraces + +`val leakTraces: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`LeakTrace`](../-leak-trace/index.md)`>` + +Overrides [Leak.leakTraces](../-leak/leak-traces.md) + +Group of leak traces which share the same leak signature. + diff --git a/docs/api/shark/shark/-library-leak/pattern.md b/docs/api/shark/shark/-library-leak/pattern.md index 628adcd92f..b8f004a980 100644 --- a/docs/api/shark/shark/-library-leak/pattern.md +++ b/docs/api/shark/shark/-library-leak/pattern.md @@ -4,6 +4,6 @@ `val pattern: `[`ReferencePattern`](../-reference-pattern/index.md) -The pattern that matched one of the references in [leakTrace](leak-trace.md), as provided to a +The pattern that matched one of the references in each of [leakTraces](leak-traces.md), as provided to a [LibraryLeakReferenceMatcher](../-library-leak-reference-matcher/index.md) instance. diff --git a/docs/api/shark/shark/-library-leak/retained-heap-byte-size.md b/docs/api/shark/shark/-library-leak/retained-heap-byte-size.md deleted file mode 100644 index 82302a6e01..0000000000 --- a/docs/api/shark/shark/-library-leak/retained-heap-byte-size.md +++ /dev/null @@ -1,11 +0,0 @@ -[shark](../../index.md) / [shark](../index.md) / [LibraryLeak](index.md) / [retainedHeapByteSize](./retained-heap-byte-size.md) - -# retainedHeapByteSize - -`val retainedHeapByteSize: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?` - -Overrides [Leak.retainedHeapByteSize](../-leak/retained-heap-byte-size.md) - -The number of bytes which would be freed if all references to the leaking object were -released. Null if the retained heap size was not computed. - diff --git a/docs/api/shark/shark/-library-leak/short-description.md b/docs/api/shark/shark/-library-leak/short-description.md new file mode 100644 index 0000000000..592cc3396f --- /dev/null +++ b/docs/api/shark/shark/-library-leak/short-description.md @@ -0,0 +1,8 @@ +[shark](../../index.md) / [shark](../index.md) / [LibraryLeak](index.md) / [shortDescription](./short-description.md) + +# shortDescription + +`val shortDescription: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) + +Overrides [Leak.shortDescription](../-leak/short-description.md) + diff --git a/docs/api/shark/shark/-library-leak/signature.md b/docs/api/shark/shark/-library-leak/signature.md new file mode 100644 index 0000000000..3f16c3ebb8 --- /dev/null +++ b/docs/api/shark/shark/-library-leak/signature.md @@ -0,0 +1,13 @@ +[shark](../../index.md) / [shark](../index.md) / [LibraryLeak](index.md) / [signature](./signature.md) + +# signature + +`val signature: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) + +Overrides [Leak.signature](../-leak/signature.md) + +A unique SHA1 hash that represents this group of leak traces. + +For [ApplicationLeak](../-application-leak/index.md) this is based on [LeakTrace.signature](../-leak-trace/signature.md) and for [LibraryLeak](index.md) this is +based on [LibraryLeak.pattern](pattern.md). + diff --git a/docs/api/shark/shark/-object-inspectors/create-leaking-object-filters.md b/docs/api/shark/shark/-object-inspectors/create-leaking-object-filters.md new file mode 100644 index 0000000000..5afb59c9d5 --- /dev/null +++ b/docs/api/shark/shark/-object-inspectors/create-leaking-object-filters.md @@ -0,0 +1,8 @@ +[shark](../../index.md) / [shark](../index.md) / [ObjectInspectors](index.md) / [createLeakingObjectFilters](./create-leaking-object-filters.md) + +# createLeakingObjectFilters + +`fun createLeakingObjectFilters(inspectors: `[`Set`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`<`[`ObjectInspectors`](index.md)`>): `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`FilteringLeakingObjectFinder.LeakingObjectFilter`](../-filtering-leaking-object-finder/-leaking-object-filter/index.md)`>` + +Creates a list of [LeakingObjectFilter](../-filtering-leaking-object-finder/-leaking-object-filter/index.md) based on the passed in [ObjectInspectors](index.md). + diff --git a/docs/api/shark/shark/-object-inspectors/index.md b/docs/api/shark/shark/-object-inspectors/index.md index 3b20a78d3b..394349b15b 100644 --- a/docs/api/shark/shark/-object-inspectors/index.md +++ b/docs/api/shark/shark/-object-inspectors/index.md @@ -27,3 +27,10 @@ A set of default [ObjectInspector](../-object-inspector/index.md)s that knows ab | Name | Summary | |---|---| | [jdkDefaults](jdk-defaults.md) | `val jdkDefaults: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`ObjectInspector`](../-object-inspector/index.md)`>` | +| [jdkLeakingObjectFilters](jdk-leaking-object-filters.md) | `val jdkLeakingObjectFilters: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`FilteringLeakingObjectFinder.LeakingObjectFilter`](../-filtering-leaking-object-finder/-leaking-object-filter/index.md)`>`
Returns a list of [LeakingObjectFilter](../-filtering-leaking-object-finder/-leaking-object-filter/index.md) suitable for common JDK projects. | + +### Companion Object Functions + +| Name | Summary | +|---|---| +| [createLeakingObjectFilters](create-leaking-object-filters.md) | `fun createLeakingObjectFilters(inspectors: `[`Set`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html)`<`[`ObjectInspectors`](./index.md)`>): `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`FilteringLeakingObjectFinder.LeakingObjectFilter`](../-filtering-leaking-object-finder/-leaking-object-filter/index.md)`>`
Creates a list of [LeakingObjectFilter](../-filtering-leaking-object-finder/-leaking-object-filter/index.md) based on the passed in [ObjectInspectors](./index.md). | diff --git a/docs/api/shark/shark/-object-inspectors/jdk-leaking-object-filters.md b/docs/api/shark/shark/-object-inspectors/jdk-leaking-object-filters.md new file mode 100644 index 0000000000..5b20b2d136 --- /dev/null +++ b/docs/api/shark/shark/-object-inspectors/jdk-leaking-object-filters.md @@ -0,0 +1,8 @@ +[shark](../../index.md) / [shark](../index.md) / [ObjectInspectors](index.md) / [jdkLeakingObjectFilters](./jdk-leaking-object-filters.md) + +# jdkLeakingObjectFilters + +`val jdkLeakingObjectFilters: `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`FilteringLeakingObjectFinder.LeakingObjectFilter`](../-filtering-leaking-object-finder/-leaking-object-filter/index.md)`>` + +Returns a list of [LeakingObjectFilter](../-filtering-leaking-object-finder/-leaking-object-filter/index.md) suitable for common JDK projects. + diff --git a/docs/api/shark/shark/-object-reporter/index.md b/docs/api/shark/shark/-object-reporter/index.md index c5ab14028a..4ca7ead95a 100644 --- a/docs/api/shark/shark/-object-reporter/index.md +++ b/docs/api/shark/shark/-object-reporter/index.md @@ -23,7 +23,7 @@ A given [ObjectReporter](./index.md) only maps to one object in the heap, but is | [heapObject](heap-object.md) | `val heapObject: HeapObject` | | [labels](labels.md) | `val labels: `[`LinkedHashSet`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-linked-hash-set/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>`
Labels that will be visible on the corresponding [heapObject](heap-object.md) in the leak trace. | | [leakingReasons](leaking-reasons.md) | `val leakingReasons: `[`MutableSet`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>`
Reasons for which this object is expected to be unreachable (ie it's leaking). | -| [likelyLeakingReasons](likely-leaking-reasons.md) | `val likelyLeakingReasons: `[`MutableSet`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>` | +| [likelyLeakingReasons](likely-leaking-reasons.md) | `val ~~likelyLeakingReasons~~: `[`MutableSet`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>`
Deprecated, use leakingReasons instead. | | [notLeakingReasons](not-leaking-reasons.md) | `val notLeakingReasons: `[`MutableSet`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>`
Reasons for which this object is expected to be reachable (ie it's not leaking). | ### Functions diff --git a/docs/api/shark/shark/-object-reporter/leaking-reasons.md b/docs/api/shark/shark/-object-reporter/leaking-reasons.md index 1069267a03..64729c1d79 100644 --- a/docs/api/shark/shark/-object-reporter/leaking-reasons.md +++ b/docs/api/shark/shark/-object-reporter/leaking-reasons.md @@ -6,7 +6,3 @@ Reasons for which this object is expected to be unreachable (ie it's leaking). -Only add reasons to this if you're 100% sure this object is leaking, otherwise add reasons to -[likelyLeakingReasons](likely-leaking-reasons.md). The difference is that objects that are "likely leaking" are not -considered to be leaking objects on which LeakCanary should compute the leak trace. - diff --git a/docs/api/shark/shark/-object-reporter/likely-leaking-reasons.md b/docs/api/shark/shark/-object-reporter/likely-leaking-reasons.md index 115185ab32..23ccc1afa1 100644 --- a/docs/api/shark/shark/-object-reporter/likely-leaking-reasons.md +++ b/docs/api/shark/shark/-object-reporter/likely-leaking-reasons.md @@ -2,9 +2,8 @@ # likelyLeakingReasons -`val likelyLeakingReasons: `[`MutableSet`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>` +`val ~~likelyLeakingReasons~~: `[`MutableSet`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>` +**Deprecated:** Replace likelyLeakingReasons with leakingReasons -**See Also** - -[leakingReasons](leaking-reasons.md) +Deprecated, use leakingReasons instead. diff --git a/docs/api/shark/shark/index.md b/docs/api/shark/shark/index.md index 82cd199fb8..4e2c2d8b4a 100644 --- a/docs/api/shark/shark/index.md +++ b/docs/api/shark/shark/index.md @@ -8,16 +8,18 @@ |---|---| | [ApplicationLeak](-application-leak/index.md) | `data class ApplicationLeak : `[`Leak`](-leak/index.md)
A leak found by [HeapAnalyzer](-heap-analyzer/index.md) in your application. | | [AppSingletonInspector](-app-singleton-inspector/index.md) | `class AppSingletonInspector : `[`ObjectInspector`](-object-inspector/index.md)
Inspector that automatically marks instances of the provided class names as not leaking because they're app wide singletons. | +| [FilteringLeakingObjectFinder](-filtering-leaking-object-finder/index.md) | `class FilteringLeakingObjectFinder : `[`LeakingObjectFinder`](-leaking-object-finder/index.md)
Finds the objects that are leaking by scanning all objects in the heap dump and delegating the decision to a list of [FilteringLeakingObjectFinder.LeakingObjectFilter](-filtering-leaking-object-finder/-leaking-object-filter/index.md) | | [HeapAnalysis](-heap-analysis/index.md) | `sealed class HeapAnalysis : `[`Serializable`](https://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html)
The result of an analysis performed by [HeapAnalyzer](-heap-analyzer/index.md), either a [HeapAnalysisSuccess](-heap-analysis-success/index.md) or a [HeapAnalysisFailure](-heap-analysis-failure/index.md). This class is serializable however there are no guarantees of forward compatibility. | | [HeapAnalysisFailure](-heap-analysis-failure/index.md) | `data class HeapAnalysisFailure : `[`HeapAnalysis`](-heap-analysis/index.md)
The analysis performed by [HeapAnalyzer](-heap-analyzer/index.md) did not complete successfully. | | [HeapAnalysisSuccess](-heap-analysis-success/index.md) | `data class HeapAnalysisSuccess : `[`HeapAnalysis`](-heap-analysis/index.md)
The result of a successful heap analysis performed by [HeapAnalyzer](-heap-analyzer/index.md). | | [HeapAnalyzer](-heap-analyzer/index.md) | `class HeapAnalyzer`
Analyzes heap dumps to look for leaks. | | [IgnoredReferenceMatcher](-ignored-reference-matcher/index.md) | `class IgnoredReferenceMatcher : `[`ReferenceMatcher`](-reference-matcher/index.md)
[IgnoredReferenceMatcher](-ignored-reference-matcher/index.md) should be used to match references that cannot ever create leaks. The shortest path finder will never go through matching references. | +| [KeyedWeakReferenceFinder](-keyed-weak-reference-finder/index.md) | `object KeyedWeakReferenceFinder : `[`LeakingObjectFinder`](-leaking-object-finder/index.md)
Finds all objects tracked by a KeyedWeakReference, ie all objects that were passed to ObjectWatcher.watch. | | [Leak](-leak/index.md) | `sealed class Leak : `[`Serializable`](https://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html)
A leak found by [HeapAnalyzer](-heap-analyzer/index.md), either an [ApplicationLeak](-application-leak/index.md) or a [LibraryLeak](-library-leak/index.md). | -| [LeakNodeStatus](-leak-node-status/index.md) | `enum class LeakNodeStatus` | -| [LeakReference](-leak-reference/index.md) | `data class LeakReference : `[`Serializable`](https://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html)
A single field in a [LeakTraceElement](-leak-trace-element/index.md). | -| [LeakTrace](-leak-trace/index.md) | `data class LeakTrace : `[`Serializable`](https://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html)
A chain of references that constitute the shortest strong reference path from a GC root to the leaking object. Fixing the leak usually means breaking one of the references in that chain. | -| [LeakTraceElement](-leak-trace-element/index.md) | `data class LeakTraceElement : `[`Serializable`](https://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html) | +| [LeakingObjectFinder](-leaking-object-finder/index.md) | `interface LeakingObjectFinder`
Finds the objects that are leaking, for which Shark will compute leak traces. | +| [LeakTrace](-leak-trace/index.md) | `data class LeakTrace : `[`Serializable`](https://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html)
The best strong reference path from a GC root to the leaking object. "Best" here means the shortest prioritized path. A large number of distinct paths can generally be found leading to a leaking object. Shark prioritizes paths that don't go through known [LibraryLeakReferenceMatcher](-library-leak-reference-matcher/index.md) (because those are known to create leaks so it's more interesting to find other paths causing leaks), then it prioritize paths that don't go through java local gc roots (because those are harder to reason about). Taking those priorities into account, finding the shortest path means there are less [LeakTraceReference](-leak-trace-reference/index.md) that can be suspected to cause the leak. | +| [LeakTraceObject](-leak-trace-object/index.md) | `data class LeakTraceObject : `[`Serializable`](https://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html) | +| [LeakTraceReference](-leak-trace-reference/index.md) | `data class LeakTraceReference : `[`Serializable`](https://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html)
A [LeakTraceReference](-leak-trace-reference/index.md) represents and origin [LeakTraceObject](-leak-trace-object/index.md) and either a reference from that object to the [LeakTraceObject](-leak-trace-object/index.md) in the next [LeakTraceReference](-leak-trace-reference/index.md) in [LeakTrace.referencePath](-leak-trace/reference-path.md), or to [LeakTrace.leakingObject](-leak-trace/leaking-object.md) if this is the last [LeakTraceReference](-leak-trace-reference/index.md) in [LeakTrace.referencePath](-leak-trace/reference-path.md). | | [LibraryLeak](-library-leak/index.md) | `data class LibraryLeak : `[`Leak`](-leak/index.md)
A leak found by [HeapAnalyzer](-heap-analyzer/index.md), where the only path to the leaking object required going through a reference matched by [pattern](-library-leak/pattern.md), as provided to a [LibraryLeakReferenceMatcher](-library-leak-reference-matcher/index.md) instance. This is a known leak in library code that is beyond your control. | | [LibraryLeakReferenceMatcher](-library-leak-reference-matcher/index.md) | `data class LibraryLeakReferenceMatcher : `[`ReferenceMatcher`](-reference-matcher/index.md)
[LibraryLeakReferenceMatcher](-library-leak-reference-matcher/index.md) should be used to match references in library code that are known to create leaks and are beyond your control. The shortest path finder will only go through matching references after it has exhausted references that don't match, prioritizing finding an application leak over a known library leak. Library leaks will be reported as [LibraryLeak](-library-leak/index.md) instead of [ApplicationLeak](-application-leak/index.md). | | [MetadataExtractor](-metadata-extractor/index.md) | `interface MetadataExtractor`
Extracts metadata from a hprof to be reported in [HeapAnalysisSuccess.metadata](-heap-analysis-success/metadata.md). | diff --git a/gradle.properties b/gradle.properties index dc21f32a67..11c740b78e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ GROUP=com.squareup.leakcanary -VERSION_NAME=2.1-SNAPSHOT +VERSION_NAME=2.1 POM_DESCRIPTION=LeakCanary diff --git a/mkdocs.yml b/mkdocs.yml index 5ea4b8947f..e6f6f3dae2 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -4,8 +4,8 @@ extra: leak_canary: - release: '2.0' - next_release: '2.1' + release: '2.1' + next_release: '2.2' site_name: LeakCanary repo_name: LeakCanary