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

Why doesn't the Admob Banner class have a dispose method? #94

Closed
hkndzdr opened this issue Oct 26, 2019 · 2 comments
Closed

Why doesn't the Admob Banner class have a dispose method? #94

hkndzdr opened this issue Oct 26, 2019 · 2 comments
Labels
question Further information is requested

Comments

@hkndzdr
Copy link

hkndzdr commented Oct 26, 2019

Why doesn't the Admob Banner class have a dispose method?

@edeuss edeuss added the question Further information is requested label Dec 20, 2019
@kmcgill88
Copy link
Owner

Adding this to README FAQ.

Technically the banner class is using PlatformView which handles disposing the view for you.

onBannerCreated: (AdmobBannerController controller) {
// Dispose is called automatically for you when Flutter removes the banner from the widget tree.
// Normally you don't need to worry about disposing this yourself, it's handled.
// If you need direct access to dispose, this is your guy!
  controller.dispose();
},

@yusriltakeuchi
Copy link

();

@kmcgill88
I check using devtools, when using controller dispose, the banner still showed in memory.
Screen Shot 2021-11-19 at 14 19 27

The controller and banner is already to dispose after widget close
Screen Shot 2021-11-19 at 14 19 41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants