• 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:48:06 -0700


On Sep 1, 2007, at 8:08 AM, Daniel Child wrote:

Maybe I shouldn't check for (self)?

Inside of an instance method self will always point to your object instance unless you explicitly set it to something else.


The "self" local variable (lvar) is passed into the method as a hidden parameter (similar to how C++ passes "this"). Also since it is an lvar it wont be changed by calls out to functions, etc. unless you pass a pointer/reference to them when you call those functions, etc.

In other words your "if (self)" check doesn't do anything useful (you never set self to anything else in that method).

-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: creating bookmarks bar.....
  • Next by Date: Re: NSBezierPath append CGGlyph
  • 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