Partager via


allocator::deallocate

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

void deallocate( 
   pointer _Ptr,  
   size_type _Count 
);

Parameters

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

  • _Count
    The number of objects to be deallocated from storage.

Remarks

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.

Example

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

Requirements

Header: <memory>

Namespace: std

See Also

Reference

allocator Class