From 2e099ab18e44e3ef044ea8b46ffa5ff80790a3d3 Mon Sep 17 00:00:00 2001 From: Polina Cherkasova Date: Fri, 21 Jul 2023 14:21:40 -0700 Subject: [PATCH 1/2] Update orchestration.dart --- pkgs/leak_tracker/lib/src/leak_tracking/orchestration.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/leak_tracker/lib/src/leak_tracking/orchestration.dart b/pkgs/leak_tracker/lib/src/leak_tracking/orchestration.dart index f9d112e3..2f13d34b 100644 --- a/pkgs/leak_tracker/lib/src/leak_tracking/orchestration.dart +++ b/pkgs/leak_tracker/lib/src/leak_tracking/orchestration.dart @@ -46,7 +46,10 @@ class MemoryLeaksDetectedError extends StateError { /// to analyse results. /// /// [gcCountBuffer] is number of full GC cycles, enough for a non reachable object to be GCed. -/// +/// If after this number of GC cycles a disposed object is still not garbage collected, +/// it is considered a notGCed leak. +/// Theoretically, the value 1 should be enough, but in practice for stale applications +/// it is too small. So, recommended value for applications is 3, and for tests is 1. /// /// If you test Flutter widgets, connect their instrumentation to the leak /// tracker: From 0515166f488c60e14c3edbfa7b8f71d2933c050e Mon Sep 17 00:00:00 2001 From: Polina Cherkasova Date: Fri, 21 Jul 2023 14:22:26 -0700 Subject: [PATCH 2/2] Update orchestration.dart --- .../leak_tracker/lib/src/leak_tracking/orchestration.dart | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/leak_tracker/lib/src/leak_tracking/orchestration.dart b/pkgs/leak_tracker/lib/src/leak_tracking/orchestration.dart index 2f13d34b..0c1ff733 100644 --- a/pkgs/leak_tracker/lib/src/leak_tracking/orchestration.dart +++ b/pkgs/leak_tracker/lib/src/leak_tracking/orchestration.dart @@ -45,11 +45,13 @@ class MemoryLeaksDetectedError extends StateError { /// to wait infinitely for the forced garbage collection, that is needed /// to analyse results. /// -/// [gcCountBuffer] is number of full GC cycles, enough for a non reachable object to be GCed. +/// [gcCountBuffer] is number of full GC cycles, that should be enough for +/// a non reachable object to be GCed. /// If after this number of GC cycles a disposed object is still not garbage collected, /// it is considered a notGCed leak. -/// Theoretically, the value 1 should be enough, but in practice for stale applications -/// it is too small. So, recommended value for applications is 3, and for tests is 1. +/// Theoretically, the value 1 should be enough, but in practice it creates false +/// positives for stale applications. +/// So, recommended value for applications is 3, and for tests is 1. /// /// If you test Flutter widgets, connect their instrumentation to the leak /// tracker: