BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslma::ManagedPtr_FactoryDeleter< OBJECT_TYPE, FACTORY > Struct Template Reference

#include <bslma_managedptr_factorydeleter.h>

Static Public Member Functions

static void deleter (void *object, void *factory)
 

Detailed Description

template<class OBJECT_TYPE, class FACTORY>
struct bslma::ManagedPtr_FactoryDeleter< OBJECT_TYPE, FACTORY >

This utility provides a general deleter for factories that provide a deleteObject operation (e.g., bslma::Allocator, bdlma::Pool).

Member Function Documentation

◆ deleter()

template<class OBJECT_TYPE , class FACTORY >
void bslma::ManagedPtr_FactoryDeleter< OBJECT_TYPE, FACTORY >::deleter ( void *  object,
void *  factory 
)
inlinestatic

Delete the specified object by invoking deleteObject on the specified factory, casting object to OBJECT_TYPE * and factory to FACTORY *. The behavior is undefined unless factory points to an object of type FACTORY, and object points to a complete object of type OBJECT_TYPE or OBJECT_TYPE has a virtual destructor and object points to an object whose dynamic type derives from 'OBJECT_TYPE.


The documentation for this struct was generated from the following file: