Namespaces
Variants
Views
Actions

std::free

From cppreference.com
< cpp‎ | memory‎ | c
Revision as of 19:13, 31 May 2013 by P12bot (Talk | contribs)

 
 
 
 
Defined in header <cstdlib>
void free( void* ptr );

Deallocates the space previously allocated by Template:rlpf, Template:rlpf or Template:rlpf. If ptr is null-pointer, the function does nothing.

The behavior is undefined if ptr does not match a pointer returned earlier by Template:rlpf, Template:rlpf or Template:rlpf. Also, the behavior is undefined if the memory area referred to by ptr has already been deallocated, that is, free() or Template:rlpf has already been called with ptr as the argument and no calls to Template:rlpf, Template:rlpf or Template:rlpf resulted in a pointer equal to ptr afterwards.

Contents

Parameters

ptr - pointer to the memory to deallocate

Return value

(none)

Example

See also