Re: file scan results in EX_BAD_ACCESS
Re: file scan results in EX_BAD_ACCESS
- Subject: Re: file scan results in EX_BAD_ACCESS
- From: Daniel Child <email@hidden>
- Date: Sat, 01 Sep 2007 11:28:40 -0400
I had forgotten that release calls dealloc. (Just learning
still....) Thanks for the explanation.
On Sep 1, 2007, at 11:19 AM, Fritz Anderson wrote:
And there it is. Calling [self release] in dealloc will result in
an additional call to dealloc. Infinite loop.
Anyway
if (self)
[self release];
doesn't make sense. You don't get to dealloc unless the last
release on self has already been encountered.
Also, unless you set self to nil in the method, if (self)... will
always evaluate to true.
— F
On Sep 1, 2007, at 10:10 AM, Daniel Child wrote:
- (void) dealloc
{
[self setFieldDelim: nil];
[self setRecordDelim: nil];
if (self) [self release];
[super dealloc];
}
_______________________________________________
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