[Top][All Lists]

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

Re: gc in GNUstep (Was: soname of gc variant of gnustep-base)

From: Helge Hess
Subject: Re: gc in GNUstep (Was: soname of gc variant of gnustep-base)
Date: Thu, 30 May 2002 14:31:03 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc3) Gecko/20020523

Markus Hitter wrote:
Each time you have two similar mechanisms for a goal, one of them is obsolete.

Not to offend you, but this is complete nonsense ;-)

There are almost always multiple solutions to a problem with various pros and cons. GC has it's advantages (eg correct detection of circular structures) and RC has it's advantages (eg much better portability).

Personally I have decided that the advantages of RC are more important than the ones of GC (more specifically, compatibility with MacOSX Foundation)

What if I retain a to-be-garbage-collected object? Can I release it? Or do I have to look into the object's docs to find out what to do?

The semantics of retain/release are/should be exactly the same in GC mode. The semantic is "create a strong, self-contained reference to the receiver" (it isn't implemented that way in neither gstep-base nor libFoundation, but probably it should).

Because of this a valid RC program *always* runs in GC mode as well ! GC is just an addition which makes it a lot easier, especially for starters (they can learn to do assembler later on ;-).

This is right. How about enhancing the debugging mechanisms around NSZombie, -retainCount etc. ?

This is always useful but doesn't improve the initial implementation (eg of complex object graphs).


reply via email to

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