[#BloombergLP-bslma-ManagedPtr_Members-set]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/ManagedPtr_Members.adoc[ManagedPtr&lowbar;Members]::set
:relfileprefix: ../../../
:mrdocs:

Reset this object to manage the specified object and deleter&period;

== Synopsis

Declared in `&lt;bslma&lowbar;managedptr&lowbar;members&period;h&gt;`

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

== Description

Reset this object to have the specified `object`, `factory`, and `deleter` with no effect on the previously managed object (if any)&period; The object does not manage a pointer if `0 &equals;&equals; object`&period; The behavior is undefined unless `object` is null if `deleter` is null&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *object*
| address of the object to manage, or 0
| *factory*
| address of the factory used by `deleter`
| *deleter*
| function used to destroy the managed object
|===


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