# OpcClient.Dispose Method

> Reference: Releases the unmanaged resources used by the OpcClient and optionally releases the managed resources.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcClient</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx.client">Opc.UaFx.Client</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
<dt>Members</dt>
<dd><a href="./members">OpcClient Members</a></dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

<span class="api-meta">protected · override</span>

Releases the unmanaged resources used by the [OpcClient](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/) and optionally releases the managed resources.

<div class="api-signature" data-lang="csharp">

```csharp
protected override void Dispose(bool disposing)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Protected Overrides Sub Dispose(disposing As Boolean)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `disposing` | [Boolean](https://learn.microsoft.com/dotnet/api/system.boolean) | The value true to release both managed and unmanaged resources; otherwise the value false to release only unmanaged resources. |

**Overrides**

[Dispose(bool)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcapplicationinstance-2/members#dispose-system-boolean)
