Re: self
Re: self
- Subject: Re: self
- From: Ondra Cada <email@hidden>
- Date: Wed, 8 Jun 2005 17:38:23 +0200
Theodore,
On 8.6.2005, at 16:59, Theodore H. Smith wrote:
Am I right in thinking that self is a local
Completely.
(stack based) variable?
Depends on how the compiler feels at the moment :) -- it might keep
it in the register it comes in (for it actually is the first
argument, $r3).
At least, for today, whilst we still run on a decent architecture...
for example the code:
-(id) init {
self = [self initSpecial];
return self;
}
should alter everything in exactly the same way as:
-(id) init {
return [self initSpecial];
}
Exactly. Note also that the former is *needed* in case of more
complex initialization:
-init {
self=[self initSpecial]; // also may need to check for nil
depending on the following code
[self whatever];
return self;
}
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >self (From: "Theodore H. Smith" <email@hidden>) |