[#BloombergLP-bslma-ManagedPtrDeleter] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::ManagedPtrDeleter :relfileprefix: ../../ :mrdocs: In‐core value‐semantic class that stores a bound delete function. == Synopsis Declared in `<bslma_managedptrdeleter.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class ManagedPtrDeleter; ---- == Description This complex constrained in‐core value‐semantic class holds the information necessary for `ManagedPtr` to correctly manage its underlying object, namely the addresses of `object` and `factory`, and the `deleter` function, optionally supplied through the constructors or through the `set` method. This information is stored in a sub‐structure to allow the compiler to copy it more efficiently. See the for information on the class attributes. Note that the class invariants are identically the constraints on the individual attributes. This class: * supports a complete set of _value‐semantic_ operations * is _exception‐safe_ * is _alias‐safe_ * is `const` _thread‐safe_ For terminology see `bsldoc_glossary`. == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslma/ManagedPtrDeleter/Deleter-03.adoc[`Deleter`] | Deleter function prototype used to destroy the managed pointer. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslma/ManagedPtrDeleter/2constructor-038.adoc[`ManagedPtrDeleter`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bslma/ManagedPtrDeleter/clear.adoc[`clear`] | Reset this `ManagedPtrDeleter` to its default‐constructed state. | xref:BloombergLP/bslma/ManagedPtrDeleter/deleteManagedObject.adoc[`deleteManagedObject`] | Invoke the deleter object. The behavior is undefined unless `deleter` is not 0 and has not already been called on the managed object associated with this deleter. | xref:BloombergLP/bslma/ManagedPtrDeleter/deleter-0d.adoc[`deleter`] | Return the deleter function associated with this deleter. | xref:BloombergLP/bslma/ManagedPtrDeleter/factory.adoc[`factory`] | Return a pointer to the factory instance associated with this deleter. | xref:BloombergLP/bslma/ManagedPtrDeleter/object.adoc[`object`] | Return a pointer to the managed object associated with this deleter. | xref:BloombergLP/bslma/ManagedPtrDeleter/set.adoc[`set`] | Set this deleter to the specified object, factory, and deleter. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslma/operator_not_eq-05.adoc[`operator!=`] | Return `true` if the specified `lhs` and `rhs` do not have the same value. | xref:BloombergLP/bslma/operator_eq-02.adoc[`operator==`] | Return `true` if the specified `lhs` and `rhs` have the same value. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#