[Issue 16008] FreeList should implement deallocateAll, as SharedFreeList does
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jan 31 11:09:12 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=16008
Basile-z <b2.temp at gmx.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |---
--- Comment #2 from Basile-z <b2.temp at gmx.com> ---
It does not. If you look carefully it only appears that it is implemented
because
of the DbI style. So if you make a FreeList with Mallocator you cant deallocate
all.
here is a test case to prevent any further confusion
---
void main() {}
struct TestCase
{
import std.experimental.allocator.mallocator : Mallocator;
import std.experimental.allocator.building_blocks : FreeList;
FreeList!(Mallocator, 16, 16) freeList;
~this()
{
freeList.deallocateAll;
}
}
---
--
More information about the Digitalmars-d-bugs
mailing list