home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!mcsun!sunic!ericom!falcon!jonas
- From: jonas@beppe.ericsson.se (Jonas Nygren)
- Subject: Re: Garbage Collection for C++
- Message-ID: <1992Aug26.121040.8995@ericsson.se>
- Sender: news@ericsson.se
- Nntp-Posting-Host: falcon.ericsson.se
- Reply-To: jonas@beppe.ericsson.se
- Organization: Ericsson Telecom AB
- References: <1992Aug25.183619.9541@microsoft.com>
- Date: Wed, 26 Aug 1992 12:10:40 GMT
- Lines: 33
-
- In article 9541@microsoft.com, jimad@microsoft.com (Jim Adcock) writes:
- > 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.
-
- I believe Apples C++ supports moveable objects. If I am correct pointers in this
- C++ are really pointers to handles which in their turn points to the objects
- current location. This would imply that each dereference in user code p->x
- would be translated by the compiler into (*p)->x.
-
- Does anybody know if Apple's C++ works this way? If so, how do they handle
- pointers to objects on the stack.
-
- /jonas
-
-
-