In C++, the operator delete destroys an object by calling its
destructor, and then deallocates the memory where that object was
stored. Occasionally, however, it is useful to separate those two
operations. [1]Destroy calls an object's destructor without
deallocating the memory where the object was stored.
The first version of destroy
destroys the object pointed to by pointer by calling the
destructor T::~T(). The memory pointed to by pointer is not
deallocated, and can be reused for some other object.
The second version of destroy
destroys all of the objects in the range of elements [first, last).
It is equivalent to calling destroy(&*i) for each iterator i
in the range [first, last).