ios - dealloc gets not called for control -


i have sub class of uiwebview , use in view controller.

cviewcontroller *controller = [[cviewcontroller alloc] init]; self.webview = controller; [controller release]; 

now in view controller dealloc gets called , call [_webview release] dealloc in uiwebview subclass gets never called , memory usage raise on every time put 1 view controller on stack , never gets released after pop stack. can see windows in safari development tools, never released. check retaincount (i know not useful) told me after assignment property retaincount 3? (property nonatomic, retain)

the retaincount of 3 red herring; useless distraction. http://www.whentouseretaincount.com , that.

since have repeatedly leak scenario, heapshot analysis should pinpoint why memory sticking around.

however, may not need go far. if app has 1 uiwebview, should able configure allocations instrument track live objects , track retain/release events. that, filter list of objects in memory down uiwebview , click through list of retain/release events associated object. retain(s) found there.

that, however, may symptom , not cause. cause caching gone wrong or other object isn't being released hanging on web view.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -