[#bsl-shared_ptr-0a-reset-04] = xref:bsl.adoc[bsl]::xref:bsl/shared_ptr-0a.adoc[shared_ptr]::reset :relfileprefix: ../../ :mrdocs: Modify this shared pointer to manage the same modifiable object (if any) as the specified `source` shared pointer to the (template parameter) type `ANY_TYPE`, and refer to the modifiable object at the specified `ptr` address (i.e., make this shared pointer an "alias" of `source`). If this shared pointer is already managing a (possibly shared) object, then release the reference to the shared object, calling the associated deleter to destroy the shared object if this shared pointer is the last reference. Note that typically the objects referred to by `source` and `ptr` have identical lifetimes (e.g., one might be a part of the other), so that the deleter for `source` will destroy them both, but do not necessarily have the same type. Also note that if `source` is empty, then this shared pointer will be reset to an empty state, even if `ptr` is not null (in which case this empty shared pointer will refer to the same object as `ptr`). Also note that if `ptr` is null and `source` is not empty, then this shared pointer will be reset to a (reference‐counted) null pointer alias. Further note that the behavior of this method is the same as `loadAlias(source, ptr)`. Finally note that this is a non‐standard BDE extension to the C++ Standard `shared_ptr` interface, which does not provide an alias overload for the `reset` function. == Synopsis Declared in `<bslstl_sharedptr.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class ANY_TYPE> void reset( xref:bsl/shared_ptr-0a.adoc[shared_ptr<ANY_TYPE>] const& source, ELEMENT_TYPE* ptr); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#