On Friday, 16 October 2015 at 08:58:25 UTC, John Colvin wrote:
void main() @nogc
{
    // try stuff out
}

Thanks for the tip. Is this 100% reliable?

As far as I know, yes. @nogc can be put on any function and will guarantee that no GC code will run inside that function or anything else it calls.

Is this a static check that fails at compile-time, or it means that if, at run-time, gc is invoked, an exception will be thrown? Sorry so many questions,
I do not have access to a compiler at the moment here.

Reply via email to