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