[#BloombergLP-bslma-SharedPtrRep-disposeObject]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/SharedPtrRep.adoc[SharedPtrRep]::disposeObject
:relfileprefix: ../../../
:mrdocs:

Dispose of the shared object referred to by this representation&period;

== Synopsis

Declared in `&lt;bslma&lowbar;sharedptrrep&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
void
disposeObject() = 0;
----

== Description

Dispose of the shared object referred to by this representation&period; This method is automatically invoked by `releaseRef` when the number of shared references reaches zero and should not be explicitly invoked otherwise&period; Note that this virtual `disposeObject` method effectively serves as the shared object&apos;s destructor&period; Also note that derived classes must override this method to perform the appropriate action such as deleting the shared object&period;


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