GC.free

Deallocates the memory referenced by p. If p is null, no action occurs. If p references memory not originally allocated by this garbage collector, if p points to the interior of a memory block, or if this method is called from a finalizer, no action will be taken. The block will not be finalized regardless of whether the FINALIZE attribute is set. If finalization is desired, call $(REF1 destroy, object) prior to GC.free.

struct GC
extern (C) pragma(mangle, "gc_free") static pure nothrow @nogc
void
free
(
void* p
)

Parameters

p void*

A pointer to the root of a valid memory block or to null.

Suggestion Box / Bug Report