C++ and garbage collection
Florian Weimer
fw@deneb.enyo.de
Fri Feb 4 22:13:00 GMT 2011
* 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.
More information about the Gcc-help
mailing list