is d-runtime non-gc safe?
Jacob Carlborg
doob at me.com
Mon Dec 5 09:52:48 PST 2011
On 2011-12-05 17:56, Johannes Pfau wrote:
> I'd say don't replace the GC with a simple malloc/free stub, remove it
> completely. Add a switch to dmd (-nogc) which disables all features
> which need the gc (especially 'new', array appending, ...). This will
> break a lot of code, but you won't have silent memory leaks this way.
>
> Code which should be usable with and without GC could use the new
> allocators API once that's finished, or a special "version(NOGC)"
> code path.
You could just remove the GC and you will get linker errors when it's
used. A -nogc flag would be better, but this could be usable workaround.
It may be possible to add a GC implementation that just adds static
asserts for all functions, I don't know.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list