[Issue 23318] GCAllocator should not implement deallocate

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Sep 9 17:42:17 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=23318

--- Comment #3 from Paul Backus <snarwin+bugzilla at gmail.com> ---
> What would be the point of a dynamic array explicitly requesting the GC?

Under what circumstances would a user of a generic container want to
instantiate that container such that it uses the GC? Presumably the same
circumstances under which users currently use containers like the ones in
std.container that hard-code a dependency on the GC.

It seems obvious and sensible to me that a generic, allocator-aware container
library should be able to offer a strict superset of the functionality
currently offered by our GC-only std.container library. That means the
allocator library should make the GC available as an option, and the obvious
way to do that is via GCAllocator.

--


More information about the Digitalmars-d-bugs mailing list