hotchemi / Android-Rate

Android-Rate is a library to help you promote your android app by prompting users to rate the app after using it for a few days.
http://hotchemi.github.io/Android-Rate
MIT License
724 stars 216 forks source link

A memory leak occurs when the screen rotates #128

Open taka-me opened 7 years ago

taka-me commented 7 years ago

If we do not use the Dialog Fragment or showDialog method, it seems that the dialog does not regenerate when the screen rotates, causing a memory leak.

hendrawd commented 6 years ago

Do you have a proof of the memory leak? Because I don't find any code that could lead to memory leak in https://github.com/hotchemi/Android-Rate/blob/master/library/src/main/java/hotchemi/android/rate/AppRate.java and https://github.com/hotchemi/Android-Rate/blob/master/library/src/main/java/hotchemi/android/rate/DialogManager.java

AlexanderLS commented 6 years ago

@taka-me @haijima Fixed in https://github.com/Vorlonsoft/AndroidRate (Release 1.1.6+). Could you check it and confirm it? Fix was in AppRate.java: private static AppRate singleton; changed to private static volatile AppRate singleton = null;