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: Shawn Erickson <email@hidden>
- Date: Sat, 01 Sep 2007 08:29:18 -0700
On Sep 1, 2007, at 8:10 AM, Daniel Child wrote:
I think the init method is pretty standard.
Nope it isn't. :)
- (id) init;
{
self = [super init];
return self;
}
- (void) dealloc
{
[self setFieldDelim: nil];
[self setRecordDelim: nil];
if (self) [self release];
[super dealloc];
}
The "if (self) [self release];" is your problem. It points out that
you may have a fundamental misunderstanding of memory management /
object life-cycle in Cocoa.
Read the following the help clear that up...
<http://developer.apple.com/documentation/Cocoa/Conceptual/
CocoaFundamentals/CocoaObjects/chapter_3_section_5.html>
<http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/
index.html>
-Shawn
_______________________________________________
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