discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RELEASE macros, was:NSString:stringWithFormat: Example?


From: Philippe C . D . Robert
Subject: Re: RELEASE macros, was:NSString:stringWithFormat: Example?
Date: Fri, 29 Sep 2000 14:52:14 +0200

On Fri, 29 Sep 2000 14:39:48 +0200
Wim Oudshoorn <woudshoo@sctcorp.com> wrote:
> I wondered about that.  What is the point in using these macros?
> Why not define the garbage collection functionality etc.
> at the root object.
> 
> As far as I can see the only overhead you have with
> 
> [object retain]
> [object release]
> and implementing RELEASE and RETAIN at the root object.
> vs.
> RETAIN(object)
> RELEASE(object)
> 
> is one method look up and one method call?

Yes, RELEASE, RETAIN, AUTORELEASE etc. are macros for 
-release/-retain/-autorelease, so the nice thing about them is that if you use 
GC those macros become 'nops' and you may save some overhead introduced by a 
method invocation which is not needed by then.

cheers, Phil
--
Philippe C.D. Robert
Developer - StudioSendai.com





reply via email to

[Prev in Thread] Current Thread [Next in Thread]