discuss-gnustep
[Top][All Lists]
Advanced

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

Re: The orca, GNUstep's mascot


From: Fred Kiefer
Subject: Re: The orca, GNUstep's mascot
Date: Tue, 29 Apr 2008 09:38:50 +0200
User-agent: Thunderbird 2.0.0.12 (X11/20080226)

Richard Frith-Macdonald wrote:
RELEASE was introduced to completely remove the call to -release in the case when gc was enabled. Apple have now effectively done the same thing by modifying the compiler to remove the call itsself... we went for a more portable solution, but as they control the compiler version being used, Apples decision makes a lot of sense.

TEST_RELEASE was added to optimise the common case of sending -release to nil when gc was not enabled ... the 'if (object)' test being much more efficient than a method call.

Neither optimisation is really important IMO, now that processors are *much* faster than they were when these macros were introduced. The overheads of calling -release are generally a much smaller proportion of the overall running time of a program than they used to be.

I think the ASSIGN, ASSIGNCOPY, and DESTROY macros are still worthwhile having as conveniences (and because they tend to prevent some common coding errors).


I fully agree with that statement. RELEASE and RETAIN really don't have much worth in themselves, but ASSIGN ASSIGNCOPY and even DESTROY do. My view is that we just stick with all of them, but don't enforce them as we used to. The idea behind being that when people use RETAIN and RELEASE they will also use ASSIGN and that is worth it.




reply via email to

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