This documentation is archived and is not being maintained.

operator delete[] (CRT) 

Frees allocated block.

void __cdecl operator delete[](
   void * object
void __cdecl operator delete[](
   void * object, 
   void * memory
) throw();
void __cdecl operator delete[](
   void * object, 
   const std::nothrow_t&
) throw();



The memory location being freed.


A pointer to the object being deleted.

This form of operator delete is known as vector delete, in contrast to the scalar delete form (operator delete).

operator delete[] frees memory allocated by operator new[].

The first form of this operator is known as the nonplacement form. The second and third forms of this operator will commonly not be called from code but exist to give the compiler a matching delete to call when a placement new fails.

The first form of the operator is defined by the compiler and does not require new.h to be included in your program.

With the exception of throwing or no-throwing behavior, the CRT operator delete[] behaves like operator delete[] in the Standard C++ Library.

Routine Required header Compatibility



Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003

For additional compatibility information, see Compatibility in the Introduction.


All versions of the C run-time libraries.

See operator new[] for examples of using operator delete.