[#BloombergLP-balm-DefaultMetricsManagerScopedGuard]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::DefaultMetricsManagerScopedGuard
:relfileprefix: ../../
:mrdocs:

This class implements a scoped guard that, on construction, creates the default instance of the metrics manager, and, on destruction, destroys that instance&period; Note that the behavior is undefined if the default instance of the metrics manager is created before creating this guard, or if the default instance is externally destroyed before destroying this guard&period;

== Synopsis

Declared in `&lt;balm&lowbar;defaultmetricsmanager&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class DefaultMetricsManagerScopedGuard;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/balm/DefaultMetricsManagerScopedGuard/2constructor-09.adoc[`DefaultMetricsManagerScopedGuard`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/balm/DefaultMetricsManagerScopedGuard/2destructor.adoc[`&#126;DefaultMetricsManagerScopedGuard`] [.small]#[destructor]#
| Destroy this scoped guard which invokes `DefaultMetricsManager&colon;&colon;destroy()`&period; The behavior is undefined if the default instance of the metrics manager is externally destroyed prior to this destructor being invoked&period;
| xref:BloombergLP/balm/DefaultMetricsManagerScopedGuard/instance.adoc[`instance`] 
| Return the address of the `MetricsManager` object managed by this scoped guard&period; The behavior is undefined if the default instance of the metrics manager is externally destroyed, or if the returned address is retained after this scoped guard is destroyed&period;
|===



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