On 3/13/09 3:05 PM, Graham Cox said: >One of my classes can sometimes fail in -initWithCoder: - it relies on >certain resources being available and if it doesn't get them, I >thought I could follow the same pattern as -init and autorelease self >and return nil.
Actually, I don't think that's the right pattern for failure in init. You should call [super dealloc] not [self autorelease]. See: <http://lists.apple.com/archives/objc-language/2008/Sep/msg00133.html> -- ____________________________________________________________ Sean McBride, B. Eng s...@rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montréal, Québec, Canada _______________________________________________ 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