Is this a bug?

bearophile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun May 4 03:41:43 PDT 2014


monarch_dodra:

> As rule of thumb, you can't allocate during a GC cleaning 
> cycles, and class destructors are usually called during a GC 
> cleaning cycle.
>
> This means it is usually unsafe to call *anything* that could 
> potentially allocate in a destructor.

So it could be a good idea to have @nogc enforcement for class 
destructors ( assuming they don't go away).

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list