mirror of
https://github.com/dlang/phobos.git
synced 2025-04-30 23:20:29 +03:00
replace deallocate with deallocateAll
test
This commit is contained in:
parent
e969c734cd
commit
09a3d25ccf
1 changed files with 6 additions and 5 deletions
|
@ -476,17 +476,18 @@ struct AllocatorList(Factory, BookkeepingAllocator = GCAllocator)
|
|||
assert(special || !allocators.ptr);
|
||||
if (special)
|
||||
{
|
||||
static if (stateSize!Allocator)
|
||||
static if (stateSize!SAllocator)
|
||||
{
|
||||
import core.stdc.string : memcpy;
|
||||
Allocator specialCopy;
|
||||
memcpy(&specialCopy, &special.a, Allocator.sizeof);
|
||||
SAllocator specialCopy;
|
||||
assert(special.a.sizeof == specialCopy.sizeof);
|
||||
memcpy(&specialCopy, &special.a, specialCopy.sizeof);
|
||||
emplace(&special.a);
|
||||
specialCopy.deallocate(allocators);
|
||||
specialCopy.deallocateAll();
|
||||
}
|
||||
else
|
||||
{
|
||||
special.deallocate(allocators);
|
||||
special.deallocateAll();
|
||||
}
|
||||
}
|
||||
allocators = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue