Newsgroups: alt.lang.design,comp.lang.c,comp.lang.c++,comp.lang.lisp,zer.z-netz.sprachen.algorithmen
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!agate!sunsite.doc.ic.ac.uk!uknet!festival!edcogsci!usenet
From: tfb@cogsci.ed.ac.uk (Tim Bradshaw)
Subject: Re: Reference Counting (was Re: Searching Method for Incremental Garbage Collection)
In-Reply-To: AST@postman.hsn.no's message of Sat, 19 Nov 1994 17:26:12 GMT
Message-ID: <TFB.94Nov21091959@burns.cogsci.ed.ac.uk>
Sender: usenet@cogsci.ed.ac.uk (C News Software)
Nntp-Posting-Host: burns
Organization: nil
References: <3ai2ol$3ua@gate.fzi.de> <CzHCvp.9rM@rheged.dircon.co.uk>
	<AST.178.785265972@postman.hsn.no>
Date: Mon, 21 Nov 1994 09:19:59 GMT
Lines: 20
Xref: glinda.oz.cs.cmu.edu comp.lang.c:117347 comp.lang.c++:99699 comp.lang.lisp:15719

* Alf Steinbach wrote:

> Reference counting DOES NOT WORK when you have circular data structures,
> which almost every program has.  Thus, reference counting is a special
> case solution, to be used *within a program*, like the concept of a
> free-list or whatever other specialized memory management.

But most programs have rather few circular structures, so the leaks
are acceptable.  The Xerox lisp machines had a reference counting GC
and you could use them for a long time (weeks) before they ran out of
memory, unless you wrote pathological programs; even given that the
compiler could sometimes make circular structures (for closures I
think).

--tim





