Wednesday, July 27, 2011

New/Better way of releasing object?

Noticed some codes are using a new (better?) way of releasing objects in the "dealloc". As below, an extra "," was added and then followed by assigning it to "nil"... Which is quite interesting...


- (void)dealloc
{
    [_window release], _window=nil;
    [_viewController release], _viewController=nil;
    [super dealloc];
}

0 comments:

Post a Comment