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

Reply via email to