home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!microsoft!hexnut!jimad
- From: jimad@microsoft.com (Jim Adcock)
- Subject: Re: Garbage Collection for C++
- Message-ID: <1992Aug25.183619.9541@microsoft.com>
- Date: 25 Aug 92 18:36:19 GMT
- Organization: Microsoft Corporation
- References: <DAVEG.92Aug17224359@synaptx.synaptics.com> <boehm.714158406@siria> <DAVEG.92Aug20022559@synaptx.synaptics.com>
- Lines: 22
-
- In article <DAVEG.92Aug20022559@synaptx.synaptics.com> daveg@synaptics.com (Dave Gillespie) writes:
- |Do you really think incremental or generational collectors are
- |feasible in C++? I've never looked in the guts of one of these
- |collectors, but as I understand it they tend to depend on the
- |ability to move data around, and other things that a C++ collector
- |might not be able to get away with. (C++'s use of pointers is so
- |unrestricted that it's a minor miracle it's possible to do garbage
- |collection at all...)
-
- Generational GC is certainly feasible in C++. In practice one needs compiler
- support for the implied "smart pointers", so that programmers don't have
- to remember to use special pointer syntax everywhere.
-
- C++ needs to support moveable objects in any case, in order to handled
- ODBMS, persistence, locality of reference, etc. If you ever have done
- store/restore of objects from moveable store, you've had to handle the
- problem of moveable objects. This is a standard programming problem not
- well handled by current C++. It needs compiler support. Immovable object
- GC schemes do not solve this problem -- they simply leave it to someone else
- to solve.
-
-
-