Giter Site home page Giter Site logo

Comments (5)

 avatar commented on July 24, 2024

Do you see this high memory usage with our iOS Banner Example app? If not, please visit our support forum to browse any SDK related issues.

from googleads-mobile-ios-examples.

benchris921 avatar benchris921 commented on July 24, 2024

I could see in the Swift iOS Banner Example app as well. Memory increasing whenever new request received.

from googleads-mobile-ios-examples.

ericleich avatar ericleich commented on July 24, 2024

When investigating issues like this, the things we look for are:

  1. Leaks tool to see if anything is actually leaked
  2. Memory usage increasing linearly with each ad request (think 10-20 reloads, not just 2)

When refreshing an ad for the first time, another WebView is used in the background to load and render while the first ad is still showing, so currently used memory goes up. But if you keep refreshing, memory should stay constant since older webviews get recycled.

from googleads-mobile-ios-examples.

benchris921 avatar benchris921 commented on July 24, 2024

Hi ericleich, Thank you for response. From my testing, it is true that memory stays while keep refreshing, But at first 4 ~ 5 refreshings, it increased memory usage.

And also, is there any retained instance as a background? I mean : memory usage is not decreased once it has been raised even after setting the delegate and rootViewController to nil, and remove ad view from super view and set it to nil. Tried to dismiss view controller that contains admob view, but memory not decreased, somewhere any instance occupies memory usage, I think.

So, now I have created singleton class and controls the admob instance (for BannerAdView and adRequest).

Please share any information if you can for this memory keep.

Thanks,
Ben

from googleads-mobile-ios-examples.

ericleich avatar ericleich commented on July 24, 2024

Hey Ben,

I think it's a side effect of using WebView. When I create a new WebView:

self.webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
[self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://www.google.com"]]];
[self.view addSubview:self.webView];

And then later remove all references:

[self.webView removeFromSuperview];
self.webView = nil;

I'm still seeing similar memory usage compared to doing the same for a banner ad.

from googleads-mobile-ios-examples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.