On Sunday, 21 August 2016 at 16:14:53 UTC, Zane wrote:
5) Is there a way to do simple heap allocation with 'new' while ensuring the GC doesn't deallocate until I want it to?

I can answer this at least,
If you don't want the GC to ever collect the object itself, here's the best way: Allocate the object with a non-GC allocator (such as std.c.malloc ), then use `emplace` to construct the object in that memory ( http://dlang.org/phobos/std_conv.html#.emplace ).


Reply via email to