It is easy to know whether a variable is correctly reclaimed by memory.
By using the reference as the key of the weak reference, when the GC is executed, if the reference can be recycled, it will be deleted from the weak reference.
--observatory-port=50443
cd forwarding_tool
go run main.go
// Flutter memory leak detection toolkit.
late MemoryChecker globalChecker = MemoryChecker("192.168.80.144");
let List memoryLeakList = [];
globalChecker.addWatch(memoryLeakList, remarks: "watch memoryLeakList note");
globalChecker.forceGC();
/// Will print `memoryLeakList` failed to recycle
globalChecker.checkGC();