From: Tudor Newsgroups: comp.os.msdos.djgpp Subject: Re: windows <-> cwsdpmi Date: Sat, 28 Dec 1996 20:41:20 -0800 Organization: Communications Accesibles Montreal Lines: 44 Message-ID: <32C5F670.191C@cam.org> References: <851364688 DOT 618879 DOT 0 AT abwillms DOT demon DOT co DOT uk> <59mpup$csp AT vidar DOT diku DOT dk> Reply-To: tudor AT cam DOT org NNTP-Posting-Host: dynppp-96.hip.cam.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Morten Welinder wrote: > > "Alaric B. Williams" writes: > > >Conservative GC can be used in C. It works like so: > > You cannot garbage collect in C unless you restrict the class > of valid programs. > > Consider: > > ----------------------------------------------------------------------------- > m = malloc (...); > > > m = 0; > ... > > ... > > > ----------------------------------------------------------------------------- > > There is no way that the garbage collector could know that m's data > area was pointed to by something in a file. > > But all this should not be taken to mean that a garbage collector > used in connection with C can not be useful. This is just theory. > > Morten not necessarely.I got a file on my hard that implements a garbage collector in c++;it automatically deallocates an object when it isn't pointed at anymore.I got it from the "byte" site,in the archives,on the oldest '95 entry. -- tudor 'at' cam 'dot' org http://www.cam.org/~tudor -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS d-(--) s(-):(+) a? C+ UL>++++ P L>+++++ E- W++ N o K---(----) w--- O---- M-- V-? PS+++ PE Y PGP t+ 5-- X+++>++++ R tv b+ DI D+ G e->++ h>++ r- y>+++++ ------END GEEK CODE BLOCK------