Comment #0 by dlang-bugzilla — 2018-05-10T11:43:54Z
AllocatorList's deallocateAll has the code:
if (special)
{
special.deallocate(allocators);
}
This has the issues:
- The return value is ignored. If the deallocation failed, the failure should be communicated to the caller. Currently, this causes a silent memory leak.
- Some allocators, such as Region, can deallocateAll, but cannot deallocate. Ideally the complete inability to deallocate() should be detected at compile-time, and such combinations rejected.
- The documentation of AllocatorList has two examples of using it with Region, which will not work (leak memory) due to the above.
Comment #1 by robert.schadek — 2024-12-01T16:33:42Z