From 89515cf71bc5197124e874de5f57ab238e689a32 Mon Sep 17 00:00:00 2001 From: Polina Cherkasova Date: Tue, 27 Aug 2024 15:00:50 -0700 Subject: [PATCH] Update TROUBLESHOOT.md --- doc/leak_tracking/TROUBLESHOOT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/leak_tracking/TROUBLESHOOT.md b/doc/leak_tracking/TROUBLESHOOT.md index d833969a..8babde0e 100644 --- a/doc/leak_tracking/TROUBLESHOOT.md +++ b/doc/leak_tracking/TROUBLESHOOT.md @@ -21,7 +21,7 @@ Follow the rules to avoid/fix notGCed and notDisposed leaks: release the references before the owner disposed the object. **Flutter specific rules:** -1. If a widget creates disposables, it should be stateful, to be able to dispose them. +1. If a widget creates disposables (loke controller), it should be stateful, to be able to dispose the disposables. **Test specific rules:** 1. If your test creates a disposable object, it should dispose it in `tearDown`, so that test failure does not result in a leak: