New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Snackbar leaks activity #125
Comments
I get this as well when using SnackbarManager, so I reverted back to the normal Snackbar class which does not leak the activity. |
My leak trace seems a little more specific: * GC ROOT static com.nispok.snackbar.SnackbarManager.currentSnackbar
* references com.nispok.snackbar.Snackbar.snackbarText
* references android.support.v7.widget.AppCompatTextView.mContext
* leaks ...activities.NowActivity instance |
I see similar as well: 05-20 11:49:24.893 25902-26313/com.gmspartnersltd.earthmiles.debug D/LeakCanary﹕ In com.gmspartnersltd.earthmiles.debug:1.6:6. |
SnackbarManager should handle the context as a weak reference :-/ |
+1 |
Noticied the memory leak too when using SnackManager |
Version 2.10.+ (2.10.8)
Snackbar leaks activity if activity is closed while snackbar is visible.
GC ROOT static com.nispok.snackbar.SnackbarManager.currentSnackbar
* references com.nispok.snackbar.Snackbar.mTargetActivity
* leaks com.example.MainActivity instance
Snackbar is displayed in activity:
SnackbarManager.show(Snackbar.with(this).type(SnackbarType.MULTI_LINE).text("text"));
//dismissing onPause doesn't solve issue
onPause(){
SnackbarManager.dismiss();
}
The text was updated successfully, but these errors were encountered: