delete (3C++std) - Tru64 UNIX
Standard C++ Library
NAME
delete - The delete operators (used to deallocate dynamic storage in a
program) are declared in the header <new>.
SYNOPSIS
#include <new>
void operator delete(void* ptr) throw();
void operator delete(void* ptr, const std::nothrow_t&) throw();
void operator delete(void *p, void*) throw();
void operator delete[](void *p) throw();
void operator delete[](void* ptr ,const std::nothrow_t&) throw();
void operator delete[](void* ptr, void*) throw();
DESCRIPTION
void *operator delete(void* ptr) throw();
void *operator delete(void* ptr, const std::nothrow_t&) throw()
These versions of delete are called by a delete expression to deallocate
storeage pointed to by ptr. A C++ program can define a function with
either of these signatures which is intended to replace the implementation
provided default provided by the Standard C++ Library. These functions
accept a value for ptr which is null or that was returned by a previous
call to operator new(std::size_t) or operator new (std::size_t, const
std::nothrow_t&). For a null ptr value, these functions do nothing.
void operator delete(void * ptr, void *) throw();
This function is called by a placement delete expression. It complements
default placement new and performs no action.
void operator delete[](void* ptr) throw();
void operator delete[](void* ptr,const std::nothrow_t&) throw();
The next two functions are called by a delete[] expression i.e. by the
forarray form of a delete expression. They are called with a value of ptr
which is null or that was returned by a previous call to operator
new[](size_t) or operator new[](size_t,const std::nothrow_t&). For a null
ptr value, these functions do nothing. A C++ program can define a function
with either of these signatures which is intended to replace the default
implementation provided by the Standard C++ Library.
void operator delete[](void* ptr, void *) throw();
This function is called by a placement array delete expression. It
complements default array placement new and performs no action.
SEE ALSO
new, no_throw
STANDARDS CONFORMANCE
ANSI X3J16/ISO WG21 Joint C++ Committee
NOTES
Placement delete and delete applied to an array allocated with placement
new is not supported in Compaq C++ Version 6.0.
privacy and legal statement