-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Potential memory leak (?) #147
Comments
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. |
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.
![image](https://private-user-images.githubusercontent.com/68894269/346263221-ba5d135f-e0ee-4572-9e16-063d86f70178.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNDczODgsIm5iZiI6MTczOTE0NzA4OCwicGF0aCI6Ii82ODg5NDI2OS8zNDYyNjMyMjEtYmE1ZDEzNWYtZTBlZS00NTcyLTllMTYtMDYzZDg2ZjcwMTc4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDAwMjQ0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJlMTc0Yjk2Mzk0YWRmMTIxYzkxMDNkNjdjYjU2NDU3YzBkZDU1ZDJhZTg3MmZhMDNiNTFkYjYxMjg5YjI0YjgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.WXRbDLis9_5zw8AcZd3QLhVrwpeaFV-0sx90GdmvUJY)
![image](https://private-user-images.githubusercontent.com/68894269/346263299-cfac6b85-6996-4e94-b522-97bff9abbd1a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNDczODgsIm5iZiI6MTczOTE0NzA4OCwicGF0aCI6Ii82ODg5NDI2OS8zNDYyNjMyOTktY2ZhYzZiODUtNjk5Ni00ZTk0LWI1MjItOTdiZmY5YWJiZDFhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDAwMjQ0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZmZmVkZGMwZDBkYzRiN2MyZjdjY2VkYTA3ZWMzNzA0MWRiMjFmMDQ3ZTkwZTE5Mjc2YjM1MTU4MWQ3YmFlYTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.wnA7hkPggPNrHb4JKUPKjGIoXQeX0RhRLEuz2IAod74)
Before loading any ads:
After loading and freeing rewarded ads:
Steps to reproduce
Additional context
No response
The text was updated successfully, but these errors were encountered: