Skip to content
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

Memory Leak #264

Open
1 of 5 tasks
Animan2010 opened this issue Jun 26, 2024 · 4 comments
Open
1 of 5 tasks

Memory Leak #264

Animan2010 opened this issue Jun 26, 2024 · 4 comments

Comments

@Animan2010
Copy link

Animan2010 commented Jun 26, 2024

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

image image

Please select the affected platforms and payment service implementation

  • Amazon
  • googlebilling
  • googlepay
  • apple robovm
  • Huawei
@MrStahlfelge
Copy link
Member

Good catch, feel free to open a pr

@Animan2010
Copy link
Author

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.

@keesvandieren
Copy link
Member

keesvandieren commented Jun 28, 2024 via email

@Animan2010
Copy link
Author

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

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants