Looks like a reasonable thing to do, e.g.: auto p = Mallocator.instance.make!ulong(0); Mallocator.instance.dispose(p); assert(p is null);
Proof of concept: void disposeX(Allocator, T)(auto ref Allocator a, ref B b) { a.dispose(b); b = null; }
Yuxuan Shui via Digitalmars-d Thu, 15 Sep 2016 10:42:02 -0700
Looks like a reasonable thing to do, e.g.: auto p = Mallocator.instance.make!ulong(0); Mallocator.instance.dispose(p); assert(p is null);
Proof of concept: void disposeX(Allocator, T)(auto ref Allocator a, ref B b) { a.dispose(b); b = null; }