discuss-gnustep
[Top][All Lists]
Advanced

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

RELEASE macros, was:NSString:stringWithFormat: Example?


From: Wim Oudshoorn
Subject: RELEASE macros, was:NSString:stringWithFormat: Example?
Date: Fri, 29 Sep 2000 14:39:48 +0200

You wrote:
> To be more accurate - you should define the macros when you are building on
> a MacOS/OPENSTEP system. Otherwise your code loses the possibility of
> working as efficiently with garbage collection under GNUstep.
>
> Of course, if you are sure you will never want to use garbage collection
> and/or you don't care about best possible performance, then using the
> retain counting methods directly is fine.

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?

I admit I haven't read the documentations and the rationale
for these macros.
And if this is the most portable and best solution it
should be explained in some introductory text on GNUstep.

Wim Oudshoorn.




reply via email to

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