Open GenaTheCrocodile opened 4 months ago
I have noticed the same thing. After a stress test the application crashes due to memory usage only if the admob plugin is enabled.
I found a memory leak in the AdView.gd script.
These RefCounted objects are never deleted because they connect the plugin's signals to lambda functions. The signals are never disconnected and so the references stay.
I'm not sure if this is the script responsible for the issue, but it could still cause some problems. I was able to fix the leak by using normal functions instead of anonymous lambdas. I added a cleanup function to disconnect all the signals, but it seems to work even without it. This might just be some of Godot's systems working that I don't understand.
Thank you for opening this issue, we will investigate
I can confirm this bug, but it's from other repository, I'll proceed with the migration
Godot version
4.2.2
Plugin version
3.1.1
Phone information
Huawei P40 lite JNY-LX1 EMUI version 12.0.0
Issue description
It seems like the admob plugin (on Android, can't test it on iOS) leaks memory. I tested it using the sample project that comes with the plugin. When you load and then free a rewarded ad, the object counter in godot doesn't decrease. Before loading any ads: After loading and freeing rewarded ads:
Steps to reproduce
Additional context
No response