Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!uflorida!travis!tom From: tom@ssd.csd.harris.com (Tom Horsley) Newsgroups: comp.object Subject: copy collecting GCs and destructors? Message-ID: Date: 14 May 91 17:13:23 GMT Sender: news@travis.csd.harris.com Organization: Harris Computer Systems Division Lines: 24 In a generation scavenging garbage collector (or I suppose any other form of copying collector) you never explicitly "delete" an object in memory, you just fail to copy it to the new memory area. With a garbage collector that works like this, how do you go about implementing "destructor" calls (to use C++ terminology). Just as one example of why you might want a destructor: you could have a stream I/O object connected to some low level operating system file descriptor, when the I/O object is no longer referenced, you would like to close the file descriptor. I have read quite a few papers on garbage collection, but I don't recall ever seeing this issue addressed. I have though of a few ways to implement destructors, but I am wondering if any existing systems have clever algorithms to solve this problem. Does anyone know of any papers that describe good ways to do this, or any existing systems that do this? -- ====================================================================== domain: tahorsley@csd.harris.com USMail: Tom Horsley uucp: ...!uunet!hcx1!tahorsley 511 Kingbird Circle Delray Beach, FL 33444 +==== Censorship is the only form of Obscenity ======================+ | (Wait, I forgot government tobacco subsidies...) | +====================================================================+