Re: retain/release question about Apple docs
Re: retain/release question about Apple docs
- Subject: Re: retain/release question about Apple docs
- From: "Martin" <email@hidden>
- Date: Mon, 06 Mar 2006 16:27:51 -0800
I'd add that you should make sure that (b) is only evaluated once:
#define REPLACE( var, expr ) { \
id _varValue_ = [(expr) retain]; \
[var release]; \
var = _varValue_; \
}
Since once you get comfy with macros like this you might do stuff like:
REPLACE( _ivar, [string lowercaseString] );
>#if __ppc__ \
>__asm__ volatile ("sync") \
>#endif \
Shaun, what's that assembly for?
~Martin
_______________________________________________
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