https://issues.dlang.org/show_bug.cgi?id=23318
Dlang Bot <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #4 from Dlang Bot <[email protected]> --- @pbackus updated dlang/phobos pull request #8554 "Remove deallocate and reallocate from GCAllocator" fixing this issue: - Remove GCAllocator.deallocate This is necessary to make clients of GCAllocator (e.g., generic containers) usable in @safe code. Memory allocated by GC allocator will still be freed by the GC when it is no longer reachable. Rejected alternatives: - Making GCAllocator.deallocate a no-op method that always returns false. The documentation in std.experimental.allocator.building_blocks specifically says not to do that. - Special-casing client code for GCAllocator to avoid calling its 'deallocate' method, while still calling 'deallocate' for other allocators. 'deallocate' has been documented as an optional method since std.experimental.allocator was introduced in 2015 (commit 8b249a6240), so this change will not break code that correctly adheres to the documented allocator interface (i.e., checks for the presence of 'deallocate' before calling it). Fixes issue 23318. https://github.com/dlang/phobos/pull/8554 --
