[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ObjectiveC accessors
From: |
Helge Hess |
Subject: |
Re: ObjectiveC accessors |
Date: |
Mon, 31 May 2004 14:38:03 +0200 |
On May 31, 2004, at 11:59, Marcel Weiher wrote:
At an application-specific level, yes, just add Boehm's conservative
GC. At a general library/language level: not a good idea, and not
really possible while preserving existing language semantics.
I agree that this is not necessarily a good idea ;-), but notably
Boehm-GC can be used as a drop-in replacement for the malloc library
(without altering semantics!) and - which is often forgotten - it
actually does provide a free() method, so for code which requires that,
you can release memory at a specified time.
Some other things which are often "forgotten" to discourage Boehm-GC
;-):
- autorelease also defers deallocation to some unknown time, pretty much
comparable to GC, only that Boehm-GC is pretty smart and supports
generational
collection etc
- the GNU runtime provides typed object memory, so Boehm-GC is actually
supported
at the language runtime level! (so its non-conservative for objects)
- GC is no either or, eg for DO you would still use the regular RC
(which of
course is hidden to a GC environment by the proxy, just like in RC)
- you can still implement -retain in such a way that it adds a root
reference,
so GC/RC behaviour would be actually similiar to regular RC, ie,
would also work
for obscured pointers (like those passed to TCL as string references
;-)
No intention to start one of the GC is good or not flame wars, feel
free to look into gnustep-dev or macosx-dev archives for those, a lot
of them should be available ;-)
Just wanted to point out some non-obvious things about the Boehm-GC
implementation which actually can provide very good compatibility with
standard C stuff.
Greets,
Helge
--
http://docs.opengroupware.org/Members/helge/
OpenGroupware.org
- ObjectiveC accessors, Stefan Urbanek, 2004/05/30
- Re: ObjectiveC accessors, David Ayers, 2004/05/30
- Re: ObjectiveC accessors, Stefan Urbanek, 2004/05/30
- Re: ObjectiveC accessors, David Ayers, 2004/05/30
- GC ( Was: Re: ObjectiveC accessors), Stefan Urbanek, 2004/05/30
- Re: GC ( Was: Re: ObjectiveC accessors), David Ayers, 2004/05/30
- Re: GC ( Was: Re: ObjectiveC accessors), Helge Hess, 2004/05/30
- Re: GC ( Was: Re: ObjectiveC accessors), Public Look, 2004/05/30
- Re: ObjectiveC accessors, Marcel Weiher, 2004/05/31
- Re: ObjectiveC accessors,
Helge Hess <=
- Re: ObjectiveC accessors, Marcel Weiher, 2004/05/31
- Re: ObjectiveC accessors, Helge Hess, 2004/05/31
- Re: ObjectiveC accessors, Martin Kuball, 2004/05/31
Re: ObjectiveC accessors, Marcel Weiher, 2004/05/30