Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!ai-lab!life!tmb From: tmb@ai.mit.edu (Thomas M. Breuel) Newsgroups: comp.lang.c++ Subject: Re: Implementing LISP in C++ (type discrimination) Message-ID: Date: 22 Apr 91 20:30:43 GMT References: <1991Mar8.024331.14235@searchtech.com> <27D7F621.2F5@tct.uucp> <17238@cadillac.CAD.MCC.COM> <1991Mar12.221015.22144@aero.org> <14342@hacgate.UUCP> <1991Apr17.233653.25149@dsd.es.com> Sender: news@ai.mit.edu Organization: MIT Artificial Intelligence Lab Lines: 18 In-reply-to: davis@barbes.ilog.fr's message of 22 Apr 91 08:55:07 GMT From: davis@barbes.ilog.fr (Harley Davis) In article <1991Apr17.233653.25149@dsd.es.com> bpendlet@bambam.dsd.es.com (Bob Pendleton) writes: It's called reference counting. It's been used since the dawn of time. Reference counting usually uses more total time than traditional garbage collection. The other cost of reference counting is the storage used by the count associated with each object. One of the most important problems with reference counting is that it doesn't collect all the garbage. In particular, circular data structures never get collected. [...] Reference counting is, however, ideal for garbage collecting large, non-recursive objects like arrays of type real, complex, bit, etc. Any other kind of garbage collection will have much higher overhead in this case, and you can never build circular data structures out of them.