GCAllocator goodAllocSize?
Jakob Ovrum via Digitalmars-d
digitalmars-d at puremagic.com
Mon Feb 1 21:04:00 PST 2016
On Sunday, 31 January 2016 at 18:52:48 UTC, Steven Schveighoffer
wrote:
> 2. How does one allocate with an allocator for typed info? In
> other words, the GC will call the dtor, but only if it knows
> what type you put in there. With std.experimental.allocator,
> there isn't a way to do that.
std.allocator.{make, dispose} is the type-aware interface. They
don't currently do anything with regards to GC, and I don't think
they really can except for the simplest case where A is exactly
GCAllocator. If GCAllocator is part of an allocator composition
or hidden behind IAllocator I don't think `make` can do anything
about it.
Maybe GCAllocator simply isn't that useful.
More information about the Digitalmars-d
mailing list