Adding lines
resolves the problem. You must also call GC.removeRange(tmp) when you will free the allocated memory.import core.memory; GC.addRange(tmp, size);
void[] mem = tmp[0..size]; // 39 _foo = emplace!(Foo)(mem); // 40
Adding lines
resolves the problem. You must also call GC.removeRange(tmp) when you will free the allocated memory.import core.memory; GC.addRange(tmp, size);
void[] mem = tmp[0..size]; // 39 _foo = emplace!(Foo)(mem); // 40