ios - Under ARC, need to set nil to all the strong member when unload the viewcontroller? Is that a must? -
Suppose I have a view controller like this:
@interface controller A: View Controller {NSString * __storage A; } @end and viewDidLoad function I set a = [[NSSString alloc] init]; and in another controller,
{controller A * controller A = [[controller alloc] init]; } Can a member of the controller be released?
Yes, string is indicated by a , when < Code> Controller A is deallocated to . You do not need to set it to zero . There is currently a place to see more information about working with ARC. An important point is that you may still need a custom -dealloc , if your class needs to do anything apart the example variable After issuing when these examples are distributed.
Comments
Post a Comment