[#BloombergLP-bslma-ManagedPtrDeleter]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::ManagedPtrDeleter
:relfileprefix: ../../
:mrdocs:

This complex constrained in&hyphen;core value&hyphen;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&period; This information is stored in a sub&hyphen;structure to allow the compiler to copy it more efficiently&period;

== Synopsis

Declared in `&lt;bslma&lowbar;managedptrdeleter&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class ManagedPtrDeleter;
----

== Description

See the  for information on the class attributes&period; Note that the class invariants are identically the constraints on the individual attributes&period;

This class&colon; &ast; supports a complete set of _value&hyphen;semantic_ operations &ast; is _exception&hyphen;safe_ &ast; is _alias&hyphen;safe_ &ast; is `const` _thread&hyphen;safe_ For terminology see `bsldoc&lowbar;glossary`&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslma/ManagedPtrDeleter/Deleter-03.adoc[`Deleter`] 
| Deleter function prototype used to destroy the managed pointer&period;
|===


== 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&hyphen;constructed state&period;
| xref:BloombergLP/bslma/ManagedPtrDeleter/deleteManagedObject.adoc[`deleteManagedObject`] 
| Invoke the deleter object&period; The behavior is undefined unless `deleter` is not 0 and has not already been called on the managed object associated with this deleter&period;
| xref:BloombergLP/bslma/ManagedPtrDeleter/deleter-0d.adoc[`deleter`] 
| Return the deleter function associated with this deleter&period;
| xref:BloombergLP/bslma/ManagedPtrDeleter/factory.adoc[`factory`] 
| Return a pointer to the factory instance associated with this deleter&period;
| xref:BloombergLP/bslma/ManagedPtrDeleter/object.adoc[`object`] 
| Return a pointer to the managed object associated with this deleter&period;
| xref:BloombergLP/bslma/ManagedPtrDeleter/set.adoc[`set`] 
| Set this `ManagedPtrDeleter` to refer to the object and factory instances located at the specified `object` and `factory` memory locations, and the specified `deleter`&period; The behavior is undefined unless `deleter` is either 0, or points to a function whose behavior is defined if called once with `object` and `factory` as arguments&period;
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslma/operator_not_eq-05.adoc[`operator!&equals;`]
| Return `true` if the specified `lhs` and `rhs` objects do not have the same value, and `false` otherwise&period; Two `ManagedPtrDeleter` objects do not have the same value if any of the corresponding values of their `object`, `factory`, and `deleter` attributes are not the same&period;
| xref:BloombergLP/bslma/operator_eq-02.adoc[`operator&equals;&equals;`]
| Return `true` if the specified `lhs` and `rhs` objects have the same value, and `false` otherwise&period; Two `ManagedPtrDeleter` objects have the same value if the corresponding values of their `object`, `factory`, and `deleter` attributes are the same&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
