ios - How to release GADBannerView on ARC? -
i sounds stupid question, seems cannot release admob gadbannerview.
admob documentation says don't call "release" when using arc. needless cannot call release because it's not allowed , generates error. tried this:
@property (nonatomic, strong) gadbannerview *admobview;
…
[admobview removefromsuperview]; admobview.delegate = nil; admobview = nil;
but nothing happens. becomes nil still stays on screen. supposed subclassed uiview. @ best can hide still received ads , stays in memory.
any ideas?
try weak reference
@property (nonatomic, weak) gadbannerview *admobview;
weak
weak similar strong except won't increase reference count 1. not become owner of object holds reference it. if object's reference count drops 0, though may still pointing here, deallocated memory.
Comments
Post a Comment