blob: ad5a0dd755f5d020195839484cf3514b3aa6292b [file] [log] [blame]
<html devsite="true">
<head>
<title>ObserverHandle</title>
{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %}
{% include "_shared/_reference-head-tags.html" %}
</head>
<body>
<div id="metadata-info-block"></div>
<h1>ObserverHandle</h1>
<p>
<pre>fun interface <a href="/reference/kotlin/androidx/compose/runtime/snapshots/ObserverHandle.html">ObserverHandle</a></pre>
</p>
<hr>
<p>The type returned by observer registration methods that unregisters the observer when it is disposed.</p>
<h2>Summary</h2>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="100%"><h3>Public functions</h3></th>
</tr>
</thead>
<tbody class="list">
<tr>
<td width="40%"><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td>
<div><code><a href="/reference/kotlin/androidx/compose/runtime/snapshots/ObserverHandle.html#dispose()">dispose</a>()</code></div>
<p>Dispose the observer causing it to be unregistered from the snapshot system.</p>
</td>
</tr>
</tbody>
</table>
</div>
<h2>Public functions</h2>
<div><a name="dispose--"></a><a name="dispose"></a>
<h3 class="api-name" id="dispose()">dispose</h3>
<pre class="api-signature no-pretty-print">fun&nbsp;<a href="/reference/kotlin/androidx/compose/runtime/snapshots/ObserverHandle.html#dispose()">dispose</a>():&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>Dispose the observer causing it to be unregistered from the snapshot system.</p>
</div>
</body>
</html>