How to get nogc to work with manual memory allocation

bearophile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Aug 24 01:48:01 PDT 2014


Bienlein:

> Is there a way to get around this?

Perhaps there are ways, but note that @nogc is meant mostly for 
stack-allocation.
In general when in D you have to write lot of hairy code to do 
something, it means that in most cases you shouldn't do that 
something.


> When calling delete t the protection violation

Don't use "delete", it's deprecated (despite it's not yet 
deprecated because D designers love to keep some important things 
in such Limbo for several years).

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list