Memory management design

Johannes Pfau nospam at example.com
Wed Jul 10 09:57:24 PDT 2013


Am Wed, 10 Jul 2013 18:12:42 +0200
schrieb Paulo Pinto <pjmlp at progtools.org>:

> Who is going to write two versions of the library then?
> 
> Throwing exceptions with @nogc pointers floating around would just
> lead to the same headache as in C++.

This will really be an issue if/once we support systems which just
can't run a GC. (Because of really limited memory or because of code
size limitations...)

Once we have ARC we might check whether switching all exceptions to ARC
would work. If we manage to combine ARC with different custom
allocators it can be integrated perfectly with the GC as well, although
for an ARC-object allocated from the GC the reference count code would
just be no-ops.


More information about the Digitalmars-d mailing list