how to check which object refers on the leaked object
LucasXu0 opened this issue · 1 comments
LucasXu0 commented
Hi team, I checked the documentation and couldn't find how to check which object refers to the leaked object. Since some leaked objects use the same type or just basic types, it's hard to find the references. Any good ideas on how to solve it? Thanks for the great job.
flutter: {
flutter: "type": "ValueNotifier<bool>",
flutter: "context": null,
flutter: "code": 41145122,
flutter: "tracked": "package:flutter/foundation.dart/ValueNotifier<dynamic>"
foundation.dart:1
flutter: }
flutter: {
flutter: "type": "ValueNotifier<bool>",
flutter: "context": null,
flutter: "code": 832570323,
flutter: "tracked": "package:flutter/foundation.dart/ValueNotifier<dynamic>"
foundation.dart:1
flutter: }
LucasXu0 commented
LeakTracking.start();
LeakTracking.phase = const PhaseSettings(
leakDiagnosticConfig: LeakDiagnosticConfig(
collectRetainingPathForNotGCed: true,
collectStackTraceOnStart: true,
),
);
MemoryAllocations.instance.addListener((p0) {
LeakTracking.dispatchObjectEvent(p0.toMap());
});