Mallocator.deallocate

Deallocates a memory block.

class Mallocator
@nogc nothrow pure shared @system
bool
deallocate
(
void[] p
)

Parameters

p void[]

A pointer to the memory block to be freed.

Return Value

Type: bool

Whether the deallocation was successful.

Examples

void[] p;
assert(Mallocator.instance.deallocate(p));

p = Mallocator.instance.allocate(10);
assert(Mallocator.instance.deallocate(p));

Meta