ably-flutter icon indicating copy to clipboard operation
ably-flutter copied to clipboard

Investigate possible leaks of StreamController instances in Push-related classes

Open ikurek opened this issue 3 years ago • 0 comments

Some push-related classes like {{PushNotificationEventsInternal}} or {{PushActivationEventsInternal}} contain instances of {{SteamController}}, which is an implementation of {{Sink}}. According to Dart guidelines, instances of {{Sink}} should be closed to avoid leaks, but in case of Push notifications module they don't seem to be. There are either no calls to {{close()}} in the code, or {{close()}} method is not implemented at all.

It would be good to investigate this, see if it can have a real impact on the library ({{close_sink}} dart lint rule is known to cause false positives), and if we can possibly handle closing those streams when they aren't needed

ikurek avatar Apr 27 '22 09:04 ikurek