home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!gatech!rpi!batcomputer!munnari.oz.au!metro!extro.ucc.su.OZ.AU!maxtal
- From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
- Subject: Re: Garbage Collection for C++
- Message-ID: <1992Aug13.151749.15679@ucc.su.OZ.AU>
- Sender: news@ucc.su.OZ.AU
- Nntp-Posting-Host: extro.ucc.su.oz.au
- Organization: MAXTAL P/L C/- University Computing Centre, Sydney
- References: <1992Aug6.014619.2111@ucc.su.OZ.AU> <3907@starlab.UUCP>
- Date: Thu, 13 Aug 1992 15:17:49 GMT
- Lines: 34
-
- In article <3907@starlab.UUCP> mi@starlab.UUCP (Michael Hoennig) writes:
- >In article <1992Aug6.014619.2111@ucc.su.OZ.AU> maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
- >
- >>GC classes cannot be allocated on the stack or statically,
- >>so when one is, it is silently converted to a GC pointer
- >>to an object.
- >
- >>Pointers to GC class objects will be GC pointers.
- >>GC pointers are like classes, they have built in destructors and
- >>constructors so they can't just disappear.
- >
- >I think this is a neverending loop. If pointers to GC class objects will be
- >GC pointers too, they will be silently converted to a GC pointer (which is
- >a pointer to a GC class) and must be silently converted to a GC ...
- >
- >=> GC class objects must be allocatable on the stack - but the compiler
- >must recocnize this.
- >
- ?? GC objects are allowed only in the GC heap. Pointers
- to these a possibly special, but they can be static, auto, or inside
- objects on the GC heap, and probably with some loss of security
- they could be allowed in objects not on the GC heap.
-
- GC pointers are like *ordinary* C++ classes, not GC classes.
- If GC objects were allowed on the stack, they would have to be
- copied when the lexical scope was exited if there were still
- existant pointers to them. So why not just allocated them
- on the GC heap in the first place?
-
- --
- ;----------------------------------------------------------------------
- JOHN (MAX) SKALLER, maxtal@extro.ucc.su.oz.au
- Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
- ;--------------- SCIENTIFIC AND ENGINEERING SOFTWARE ------------------
-