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!
目前没有办法,但是您可以在此处关注问题的进展: https : //github.com/dart-lang/linter/issues/697
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.