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

Dispose of this representation object&period;

== Synopsis

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

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

== Description

Dispose of this representation object&period; This method is automatically invoked by `releaseRef` and `releaseWeakRef` when the number of weak references and the number of shared references both reach zero and should not be explicitly invoked otherwise&period; The behavior is undefined unless `disposeObject` has already been called for this representation&period; Note that this virtual `disposeRep` method effectively serves as the representation object&apos;s destructor&period; Also note that derived classes must override this method to perform appropriate action such as deleting this representation, or returning it to an object pool&period;


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