ably-flutter
ably-flutter copied to clipboard
Investigate possible leaks of StreamController instances in Push-related classes
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