On Feb 20, 2009, at 1:05 AM, Alexander Spohr wrote:
You should therefore also set outlet variables to nil in dealloc:
- (void)dealloc {
// release outlets and set outlet variables to nil
[anOutlet release], anOutlet = nil;
[super dealloc];
}
why not just use
[self setAnOutlet = nil];
or
self.anOutlet = nil;
The paragraph above illustrates exactly why you shouldn't do this.
See also, for example, <http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/chapter_4_section_4.html#//apple_ref/doc/uid/TP30001163-CH22-SW13
>
mmalc
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com