Destroy the specified object based on its dynamic type and then use the specified allocator to deallocate its memory footprint. Do nothing if object is a null pointer. The behavior is undefined unless allocator is non‐null, and object, when cast appropriately to void *, was allocated using allocator and has not already been deallocated. Note that dynamic_cast<void *>(object) is applied if TYPE is polymorphic, and static_cast<void *>(object) is applied otherwise.

Synopsis

Declared in <bslma_deleterhelper.h>

template<
    class TYPE,
    class ALLOCATOR>
static
void
deleteObject(
    TYPE const* object,
    ALLOCATOR* allocator);

Created with MrDocs