On Monday, 6 March 2017 at 06:39:27 UTC, Jack Stouffer wrote:

void loop() {
    // code
}

void loadLevel() {
    import core.memory : GC;
    GC.disable();
    while(stuff)
        loop();
    GC.collect();
}

GC.disable doesn't guarantee the garbage collector won't run: https://dlang.org/phobos/core_memory.html#.GC.disable I'm not sure how much impact that has in practice.

Reply via email to