You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, I may be wrong, but in the plugins below it looks like that registration in the ActivityLifecycleCallbacks and in the LocalBroadcastManager may become memory leaks in case the Flutter Activity is open multiple times.
For instance, when flutter is being used in add-to-app to show a product detail. Every time that Activity is open the plugin registration process is triggered and a new listener is attached, but it is never released.
So, I may be wrong, but in the plugins below it looks like that registration in the
ActivityLifecycleCallbacks
and in theLocalBroadcastManager
may become memory leaks in case the Flutter Activity is open multiple times.For instance, when flutter is being used in add-to-app to show a product detail. Every time that Activity is open the plugin registration process is triggered and a new listener is attached, but it is never released.
https://github.com/flutter/plugins/blob/master/packages/firebase_messaging/android/src/main/java/io/flutter/plugins/firebasemessaging/FirebaseMessagingPlugin.java#L58
https://github.com/flutter/plugins/blob/master/packages/image_picker/android/src/main/java/io/flutter/plugins/imagepicker/ImagePickerPlugin.java#L95
https://github.com/flutter/plugins/blob/master/packages/google_maps_flutter/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapsPlugin.java#L36
I have some ideas of how to avoid those calls, but I would like to confirm this before trying to change the code.
The text was updated successfully, but these errors were encountered: