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

GADRewardedAd object is not destroyed and causes memory leak #191

Open
mustafayd opened this issue Dec 23, 2020 · 0 comments
Open

GADRewardedAd object is not destroyed and causes memory leak #191

mustafayd opened this issue Dec 23, 2020 · 0 comments

Comments

@mustafayd
Copy link

mustafayd commented Dec 23, 2020

I created a game, that includes Admob, with Unity for iOS but rewarded ad causes memory leak with current API when I test the game in real device. Since RewardedAd is a one-time-use object so we create the object many times in app lifecycle. However, the rewarded ad object has no Destroy object and it can not be destroyed. I create rewarded ad object in Start function as suggested but this causes object creation in each game level (scene) and it is not destroyed somehow. I played the game for a while and checked the memory in XCode, there are 22 GADRewardedAd object instance.

I also try to unbind all the listeners before new object creation and in 'onDestory function' but nothing changes.

Unity version: 2018.4.01f and 2019.4.17f1
iOS 14.3
Xcode 12.3
Latest Admob SDK

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

1 participant