Destroy the specified object without deallocating its storage.
Synopsis
Declared in <bslalg_scalarprimitives.h>
template<class TARGET_TYPE>
static
void
destruct(
TARGET_TYPE* object,
void* allocator);
Description
Destroy the specified object of the parameterized TARGET_TYPE, as if by calling the TARGET_TYPE destructor, but do not deallocate the memory occupied by object. Note that the destructor may deallocate other memory owned by object. Also note that this function is a no‐op if the TARGET_TYPE has the trivial destructor trait. Further note that the specified allocator is not used.
DEPRECATED: Use bslma::DestructionUtil::destroy without an allocator argument instead.
Parameters
Name |
Description |
object |
object to destroy |
allocator |
unused allocator argument |
Created with MrDocs