From: | Basile STARYNKEVITCH <basile@starynkevitch.net> |
Newsgroups: | comp.compilers |
Date: | 4 Jul 2003 00:06:26 -0400 |
Organization: | http://lesours.starynkevitch.net/ - Les Ours |
References: | 03-05-211 03-06-015 03-06-054 03-06-057 03-06-078 03-07-005 |
Keywords: | storage |
Posted-Date: | 04 Jul 2003 00:06:26 EDT |
>>>>> "Joachim" == Joachim Durchholz <joachim.durchholz@web.de> writes:
Joachim> Eric wrote:
>> mwotton@cse.unsw.edu.au (Mark Alexander Wotton) wrote
>>
>>> On 5 Jun 2003 23:22:01 -0400, Eric posted:
>>>
>>> Either that, or only released when all references to it have
>>> passed out of scope. This is how many modern garbage-collected
>>> language implementations work.
Modern GC are usually *not* reference-counters based! But some crude
language implementations do happen to have poor garbage collectors,
sometimes only reference-counting based (which works poorly for
reference cycles and costs a lot).
>> This scheme (reference-counting) is used in VB6 for instance.
Joachim> No, garbage-collected languages don't use reference
Joachim> counting.
Sorry to be picky, but reference counting actually is a (crude) method
of garbage collection (and language implementations have GC, not the
language themselves!) Of course, I do think that most of the time,
better ways of garbage collection exist, in particular generational
copying GC (which can even be used in C, provided you agree to follow
strict coding constraints - see http://freshmeat.net/projects/qish for
an example of such a GC).
Ref counting does have it uses, notably in distributed GC (where they
are used in addition of better, locally working, GCs).
See for example Jones&Lins' book on GC for more.
Regards.
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net
aliases: basile<at>tunes<dot>org = bstarynk<at>nerim<dot>net
8, rue de la Faïencerie, 92340 Bourg La Reine, France
Return to the
comp.compilers page.
Search the
comp.compilers archives again.