On 10/24/13, Namespace <rswhi...@googlemail.com> wrote: > A dream of me, that will probably never come true, would be also > something like this: > ---- > with (Mallocator) { > int[] arr; > arr ~= 42; /// will use Mallocator.it.allocate internal > } > ---- >
Actually this got me thinking.. import core.memory; GC.useAllocator!Mallocator; int[] arr; arr ~= 42; This could be a useful test-bed for the allocators by using them with existing D applications and libraries that depend on the GC (most apps I'd assume).