Memory Leak
Animan2010 opened this issue · 4 comments
Issue details, reproduction steps/code
On the Android, when the application is restarted multiple times using back button (destroys activity but not application), despite calls to destroy, activity, reportfragment and some google class leaks remain in the memory dump.
If you remove the final attribute from the activity inside class PurchaseManagerGoogleBilling and assign activity to null in the destroy(), then the leaks disappear.
Version of gdx-pay and/or relevant dependencies
1.3.7
Stacktrace


Please select the affected platforms and payment service implementation
- Amazon
- googlebilling
- googlepay
- apple robovm
- Huawei
Good catch, feel free to open a pr
Good catch, feel free to open a pr
I'm not sure that this is a good solution to the problem, rather temporary workaround in my project, it turns out that the PurchaseManagerGoogleBilling instance itself remains registered in memory, it might be better to delete it on destroy.
If yes, can you share the project?
Of course, I created an almost empty project using the current gdx-setup and gdx-pay, the result is the same, leaks if restarting the game on the Android emulator (api 28) multiple using the back key.
https://github.com/Animan2010/GdxTest
