Disabling GC in D
Dibyendu Majumdar via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Jan 21 14:20:13 PST 2016
On Thursday, 21 January 2016 at 22:15:13 UTC, Chris Wright wrote:
>
> Finally, you can use gc_setProxy() with a a GC proxy you
> create. Have it throw an exception instead of allocating. That
> means you will get crashes instead of memory leaks if something
> uses the GC when it shouldn't.
>
> gc_setProxy() and struct Proxy seem not to be part of the
> public runtime. You can copy the definitions into your own
> project -- they're listed as extern(C) to make that easier.
> This may tie you to specific DMD revisions in the case that the
> GC interface changes.
Thanks - I am looking for an option where no GC memory allocation
is possible so above looks like the solution.
Regards
More information about the Digitalmars-d-learn
mailing list