Anyone has memory leak problem in your cocos2d-x + admob project.?

I’m having very hard time.

I’ve been working on my first android+iphone cocos2d-x project, and it’s almost done.

But when I attached admob in my project, I found that lots of memory is leaking out when

the admob ad is refreshing in both android and iphone.

I can’t tell what is causing this.

Is there anyone who succeeded in making cocos2d-x + admob project without memory leak problem…?

Please tell me…

would you mind sharing your code? i haven’t seen any guides on integrating admob to cocos2dx, i think it would be great for the community to work out how to use it in our games.

Are you using the latest Admob SDK?
If so I don’t it has any leaks. What method did you use to detect the leaks?

Yes admob is the latest, and cocos2d-x is 0.12.0 version.

Memory leaks are found everytime I call loadRequest method to refresh.

Oren, do you refresh admob ads in your cocos2d-x project…?

(and about game dev. Code sharing could be possible someday)

If you want to find a easy share of integrated admob on cocos2d-x hybrid project, I have written a simple guide.

Hope that will help you find a way to integrated your game with admob.

There are some other post on my blogs that will described the updated with latest cocos2d-x version.

Thank you Lin.
I already visited your site and did my work taking hints from the page :wink:

But I came across memory leak. T.T

Haven’t you seen such thing with leak profiler…?

thanks for the guide Simon, i just tested the ads and they work, but theres a problem, my size for the android app is 640x960 which get scaled by cocos2dx but the ads don’t so if i try to run it on smaller screen sizes i get

Received ad url: <"url": "http://googleads.g.doubleclick.net...
onReceiveAd()
Not enough space to show ad! Wants: <640, 100>, Has: <320, 480>

ho ho wrote:

Thank you Lin.
I already visited your site and did my work taking hints from the page :wink:
>
But I came across memory leak. T.T
>
Haven’t you seen such thing with leak profiler…?

Dear ho ho:

I am not aware about the memory leak problems on my game.

This problem happened to you is only on iOS or Android ?

Or even worth, both of two ?

game dev wrote:

thanks for the guide Simon, i just tested the ads and they work, but theres a problem, my size for the android app is 640x960 which get scaled by cocos2dx but the ads don’t so if i try to run it on smaller screen sizes i get
[…]

Hi, game dev(^^):

I don’t use the scale mechanism provided by cocos2d-x.

Instead of that, I use my own scale mechanism because there are too many resolutions that I need to support.

And I only want to maintain one copy of resources. I think that’s why I don’t have the same problem that you have.

Sorry that I can’t give you any help of this.