This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: C++ and garbage collection
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 04 Feb 2011 21:25:14 +0100
- Subject: Re: C++ and garbage collection
- References: <20110204194604.GB12837@nibiru.local>
* Enrico Weigelt:
> My idea is to add some mark+sweep gc (boem-gc ?) and remove (or
> somehow disable) all delete operations. Does that work safely,
> or do I have to cope with certain nasty side effects ?
Performance might change.
Object lifetimes are no longer deterministic, and destructors will not
be called. This can be a significant issue.
There are a few cases when the Boehm-Dehmers-Weiser collector won't
work, for instance if you have got custom memory allocators or use
some pointer encoding schemes.