• 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: 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


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

  • Prev by Date: Re: Why no -[NSManagedObjectContext deleteObjects:] ?
  • Next by Date: Re: file scan results in EX_BAD_ACCESS
  • Previous by thread: Re: file scan results in EX_BAD_ACCESS
  • Next by thread: Re: file scan results in EX_BAD_ACCESS
  • Index(es):
    • Date
    • Thread