objective c - ARC UIViewController not being dealloc-ed when popped from stack -
i have navigation-based app , utilize mbprogresshud crazy in app. converted arc when came out , experienced lot of app crashes , not understand why. began using analyzer tools , saw memory consumption through roof. went of view controllers , overloaded dealloc methods include write out nslog tell me if beingness dealloced or not. surprise, none of viewcontrollers used mbprogresshud beingness dealloced.
i calling mbprogresshud this:
hud = [[mbprogresshud alloc] initwithview:self.navigationcontroller.view]; [self.navigationcontroller.view addsubview:hud]; hud.delegate = self; hud.labeltext = @"retrieving signature"; [hud showwhileexecuting:@selector(getsignature) ontarget:self withobject:nil animated:yes];
when done mbprogresshud, need clean hud setting delegate nil, removing superview , setting hud nil.
hud.delegate = nil; [hud removefromsuperview]; hud=nil;
objective-c automatic-ref-counting
No comments:
Post a Comment