Return a ManagedPtr referring to the same object as this shared_ptr.
Synopsis
Declared in <bslstl_sharedptr.h>
BloombergLP::bslma::ManagedPtr<ELEMENT_TYPE>
managedPtr() const;
Description
Return a managed pointer that refers to the same object as this shared pointer. If this shared pointer is not empty, and is not null, then increment the shared count on the shared object, and give the managed pointer a deleter that decrements the reference count for the shared object. Note that if this shared_ptr is reference‐ counting a null pointer, the empty bslma::ManagedPtr returned will not participate in that shared ownership.
Return Value
managed pointer referring to the same object
Created with MrDocs