Re: [super dealloc] when init fails. Was: Logging pointer EXC_BAD_ACCESS?
Re: [super dealloc] when init fails. Was: Logging pointer EXC_BAD_ACCESS?
- Subject: Re: [super dealloc] when init fails. Was: Logging pointer EXC_BAD_ACCESS?
- From: Jerry Krinock <email@hidden>
- Date: Sun, 29 May 2011 16:54:49 -0700
Thanks, all.
Quincey, the three Error Points you defined are great. Fortunately, in this case I have the easy oneā¦
On 2011 May 29, at 13:03, Quincey Morris wrote:
> Error point #2 (super returns nil) is easy. Just return nil.
because one should assume that the superclass will have cleaned up after itself before returning nil.
My mistake was to blindly apply Greg Parker's advice in all cases when in fact it only applies to Error point #3.
On 2011 May 29, at 13:17, Quincey Morris wrote:
> The significance of calling it a bug is that someone might actually file a bug report, which might result in Apple either allowing nil in the super case or changing the documentation to match the actual behavior. I don't care which is the outcome, but I think one of those things should happen.
Well, it's Bug ID# 9522343 now. I called it a Documentation bug.
A possible justification for the current situation is that "super is not self". However, there should at least be mention made in "Sending Messages to nil" that sending a message to super when self is nil will likely crash.
I linked Apple to this thread. With 60 billion in the bank, I figure they can afford to give it at least as much thought as you and Ken have, or even easier, copy and paste your text into one of their documents.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden