Reputation: 5172
I was wondering if there's a way to mark a class as "needing disposal" in Dart.
What I mean to do is replicate the linter warning that gets shown, for example, when I create a StreamController
and not dispose it somewhere in my code, the close_sinks
warning is shown.
This does not happen for other classes like AnimationController
or ValueNotifier
.
What does make a class raise this kind of warning? How can I replicate that for my own needs? Can I at all?
Thanks in advance!
Upvotes: 0
Views: 130
Reputation: 6524
At the moment there is no way, but you can follow the issue progress here: https://github.com/dart-lang/linter/issues/697
Upvotes: 1