[#bsl-shared_ptr-0a-createInplace-07] = xref:bsl.adoc[bsl]::xref:bsl/shared_ptr-0a.adoc[shared_ptr]::createInplace :relfileprefix: ../../ :mrdocs: Create "in‐place" in a large enough contiguous memory region both an internal representation for this shared pointer and a default‐constructed object of `ELEMENT_TYPE`, and make this shared pointer refer to the newly‐created `ELEMENT_TYPE` object. The currently installed default allocator is used to supply memory. If an exception is thrown during allocation or construction of the `ELEMENT_TYPE` object, this shared pointer will be unchanged. Otherwise, if this shared pointer is already managing a (possibly shared) object, then release the shared reference to that shared object, and destroy it using its associated deleter if this shared pointer held the last shared reference to that object. == Synopsis Declared in `<bslstl_sharedptr.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void createInplace(); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#