[Issue 17914] [Reg 2.075] Fibers guard page uses a lot more memory mappings

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Oct 27 23:18:52 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=17914

--- Comment #9 from Martin Nowak <code at dawg.eu> ---
If scoped isn't enough, you could use automem (~master or the next release) for
ref-counted classes.
http://code.dlang.org/packages/automem

import automem.ref_counted;

    auto gen = RefCounted!(Generator!int)({yield(42);});
    writeln(gen.front);
    gen.popFront;
    assert(gen.empty);

--


More information about the Digitalmars-d-bugs mailing list