From 3a061a415bba7689e0387f227c88c766291273bd Mon Sep 17 00:00:00 2001 From: Polina Cherkasova Date: Fri, 21 Jul 2023 14:31:00 -0700 Subject: [PATCH] Improve doc comments. (#100) --- .../lib/src/leak_tracking/orchestration.dart | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/leak_tracker/lib/src/leak_tracking/orchestration.dart b/pkgs/leak_tracker/lib/src/leak_tracking/orchestration.dart index f9d112e3..0c1ff733 100644 --- a/pkgs/leak_tracker/lib/src/leak_tracking/orchestration.dart +++ b/pkgs/leak_tracker/lib/src/leak_tracking/orchestration.dart @@ -45,8 +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 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: