flagLeak method
Flag the object as having been disposed in a way that allows easier profiling.
The leak flag is only set after disposal, so most instances found in a heap snapshot will indicate memory leaks.
Consumers can search a heap snapshot for the LeakFlag
class to
see all instances of the flag.
Implementation
@override
void flagLeak([String? description]) {
_disposable.flagLeak(
description ?? '$disposableTypeName (runtimeType: $runtimeType)');
}