Search:
Reference
<memory>
allocator
destroy
[try Beta version]
Not logged in
register
log in
user name:
password:
remember me
forgot your password?
or sign in using:
try again
cancel
forgot your password?
public member function
<memory>
std::
allocator
::destroy
C++98
C++11
void destroy (pointer p);
template <class U> void destroy (U* p);
Destroy an object
Destroys in-place the object pointed by
p
.
Notice that this does not deallocate the storage for the element (see member
deallocate
to release storage space).
C++98
C++11
The function uses
value_type
's destructor (
value_type
is a member type, alias of the
allocator
's template parameter), as if the following code was used:
p->~value_type();
The function uses
U
's destructor, as if the following code was used:
p->~U();
Parameters
p
Pointer to the object to be destroyed.
Return value
none
See also
allocator::deallocate
Release block of storage
(public member function )
allocator::construct
Construct an object
(public member function )
C++
Information
Tutorials
Reference
Articles
Forum
Reference
C library:
<cassert> (assert.h)
<cctype> (ctype.h)
<cerrno> (errno.h)
<cfenv> (fenv.h)
<cfloat> (float.h)
<cinttypes> (inttypes.h)
<ciso646> (iso646.h)
<climits> (limits.h)
<clocale> (locale.h)
<cmath> (math.h)
<csetjmp> (setjmp.h)
<csignal> (signal.h)
<cstdarg> (stdarg.h)
<cstdbool> (stdbool.h)
<cstddef> (stddef.h)
<cstdint> (stdint.h)
<cstdio> (stdio.h)
<cstdlib> (stdlib.h)
<cstring> (string.h)
<ctgmath> (tgmath.h)
<ctime> (time.h)
<cuchar> (uchar.h)
<cwchar> (wchar.h)
<cwctype> (wctype.h)
Containers:
<array>
<deque>
<forward_list>
<list>
<map>
<queue>
<set>
<stack>
<unordered_map>
<unordered_set>
<vector>
Input/Output:
<fstream>
<iomanip>
<ios>
<iosfwd>
<iostream>
<istream>
<ostream>
<sstream>
<streambuf>
Multi-threading:
<atomic>
<condition_variable>
<future>
<mutex>
<thread>
Other:
<algorithm>
<bitset>
<chrono>
<codecvt>
<complex>
<exception>
<functional>
<initializer_list>
<iterator>
<limits>
<locale>
<memory>
<new>
<numeric>
<random>
<ratio>
<regex>
<stdexcept>
<string>
<system_error>
<tuple>
<type_traits>
<typeindex>
<typeinfo>
<utility>
<valarray>
<algorithm>
<array>
<atomic>
<bitset>
<cassert> (assert.h)
<cctype> (ctype.h)
<cerrno> (errno.h)
<cfenv> (fenv.h)
<cfloat> (float.h)
<chrono>
<cinttypes> (inttypes.h)
<ciso646> (iso646.h)
<climits> (limits.h)
<clocale> (locale.h)
<cmath> (math.h)
<codecvt>
<complex>
<condition_variable>
<csetjmp> (setjmp.h)
<csignal> (signal.h)
<cstdarg> (stdarg.h)
<cstdbool> (stdbool.h)
<cstddef> (stddef.h)
<cstdint> (stdint.h)
<cstdio> (stdio.h)
<cstdlib> (stdlib.h)
<cstring> (string.h)
<ctgmath> (tgmath.h)
<ctime> (time.h)
<cuchar> (uchar.h)
<cwchar> (wchar.h)
<cwctype> (wctype.h)
<deque>
<exception>
<forward_list>
<fstream>
<functional>
<future>
<initializer_list>
<iomanip>
<ios>
<iosfwd>
<iostream>
<istream>
<iterator>
<limits>
<list>
<locale>
<map>
<memory>
<mutex>
<new>
<numeric>
<ostream>
<queue>
<random>
<ratio>
<regex>
<set>
<sstream>
<stack>
<stdexcept>
<streambuf>
<string>
<system_error>
<thread>
<tuple>
<type_traits>
<typeindex>
<typeinfo>
<unordered_map>
<unordered_set>
<utility>
<valarray>
<vector>
<memory>
classes:
allocator
allocator_arg_t
allocator_traits
auto_ptr
auto_ptr_ref
bad_weak_ptr
default_delete
enable_shared_from_this
owner_less
pointer_traits
raw_storage_iterator
shared_ptr
unique_ptr
uses_allocator
weak_ptr
enum classes:
pointer_safety
functions:
addressof
align
allocate_shared
const_pointer_cast
declare_no_pointers
declare_reachable
dynamic_pointer_cast
get_deleter
get_pointer_safety
get_temporary_buffer
make_shared
return_temporary_buffer
static_pointer_cast
undeclare_no_pointers
undeclare_reachable
uninitialized_copy
uninitialized_copy_n
uninitialized_fill
uninitialized_fill_n
objects:
allocator_arg
addressof
align
allocate_shared
allocator
allocator_arg
allocator_arg_t
allocator_traits
auto_ptr
auto_ptr_ref
bad_weak_ptr
const_pointer_cast
declare_no_pointers
declare_reachable
default_delete
dynamic_pointer_cast
enable_shared_from_this
get_deleter
get_pointer_safety
get_temporary_buffer
make_shared
owner_less
pointer_safety
pointer_traits
raw_storage_iterator
return_temporary_buffer
shared_ptr
static_pointer_cast
undeclare_no_pointers
undeclare_reachable
uninitialized_copy
uninitialized_copy_n
uninitialized_fill
uninitialized_fill_n
unique_ptr
uses_allocator
weak_ptr
allocator
allocator::~allocator
allocator::allocator
member classes:
allocator::rebind
member functions:
allocator::address
allocator::allocate
allocator::construct
allocator::deallocate
allocator::destroy
allocator::max_size
allocator::address
allocator::allocate
allocator::allocator
allocator::construct
allocator::deallocate
allocator::destroy
allocator::max_size
allocator::rebind
allocator::~allocator