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

Set this deleter to the specified object, factory, and deleter&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
set(
    void* object,
    void* factory,
    xref:BloombergLP/bslma/ManagedPtrDeleter/Deleter-03.adoc[Deleter] deleter);
----

== Description

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;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *object*
| Address of the object to be destroyed by the factory&period;
| *factory*
| Address of the factory responsible for destroying `object`&period;
| *deleter*
| Function that destroys `object` using `factory`&period;
|===


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