• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: file scan results in EX_BAD_ACCESS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: file scan results in EX_BAD_ACCESS (From: Daniel Child <email@hidden>)

  • Prev by Date: Re: file scan results in EX_BAD_ACCESS
  • Next by Date: Re: creating bookmarks bar.....
  • Previous by thread: Re: file scan results in EX_BAD_ACCESS
  • Next by thread: initializing ivars
  • Index(es):
    • Date
    • Thread