[Issue 23090] Allocators should not use NullAllocator as a sentinel type
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Sep 19 19:23:53 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=23090
--- Comment #1 from Dlang Bot <dlang-bot at dlang.rocks> ---
@pbackus updated dlang/phobos pull request #8574 "[allocator/region] Issue
23090 - Don't use NullAllocator as a sentinel type" mentioning this issue:
- Region: don't use NullAllocator as a sentinel
Region will now always assume that its ParentAllocator is a real
allocator, and attempt to use its 'allocate' and 'deallocate' methods
accordingly.
The behavior previously provided by Region!(NullAllocator, ...) remains
available via BorrowedRegion!(...).
See issue 23090 for detailed rationale.
- SharedRegion: don't use NullAllocator as sentinel
SharedRegion will now always assume that its ParentAllocator is a real
allocator, and attempt to use its 'allocate' and 'deallocate' methods
accordingly.
The behavior previously provided by SharedRegion!(NullAllocator, ...)
remains available via shared(BorrowedRegion!(...)).
See issue 23090 for detailed rationale.
https://github.com/dlang/phobos/pull/8574
--
More information about the Digitalmars-d-bugs
mailing list