Collapse the table of content
Expand the table of content
The document is archived and information here might be outdated


Frees a specified number of objects from storage beginning at a specified position.

void deallocate(
   pointer _Ptr, 
   size_type _Count



A pointer to the first object to be deallocated from storage.


The number of objects to be deallocated from storage.

The member function frees storage for the array of count objects of type Type beginning at _Ptr, by calling operator delete(_Ptr). The pointer _Ptr must have been returned earlier by a call to allocate for an allocator object that compares equal to *this, allocating an array object of the same size and type. deallocate never throws an exception.

For an example using the member function, see allocator::allocate.

Header: <memory>

© 2016 Microsoft