[#bsl-shared_ptr-0a-load-0b] = xref:bsl.adoc[bsl]::xref:bsl/shared_ptr-0a.adoc[shared_ptr]::load :relfileprefix: ../../ :mrdocs: Modify this shared pointer to manage the modifiable object of the (template parameter) type `COMPATIBLE_TYPE` at the specified `ptr` address and to refer to `(ELEMENT_TYPE *)ptr`. If this shared pointer is already managing a (possibly shared) object, then, unless an exception is thrown allocating memory to manage `ptr`, release the reference to the shared object, calling the associated deleter to destroy the shared object if this shared pointer is the last reference. The currently installed default allocator is used to allocate the internal representation of this shared pointer, and the shared object will be destroyed by a call to `delete ptr` when all references have been released. If an exception is thrown allocating the internal representation, then `delete ptr` is called and this shared pointer retains ownership of its original object. If `COMPATIBLE_TYPE*` is not implicitly convertible to `ELEMENT_TYPE*`, then a compiler diagnostic will be emitted indicating the error. Note that if `ptr` is 0, then this shared pointer will still allocate an internal representation to share ownership of that empty state, which will be reclaimed when the last reference is destroyed. Also note also that the behavior of this method is the same as `reset(ptr)`. == Synopsis Declared in `<bslstl_sharedptr.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class COMPATIBLE_TYPE> void load(COMPATIBLE_TYPE* ptr); ---- == Description DEPRECATED: Use `reset` instead. [.small]#Created with https://www.mrdocs.com[MrDocs]#