# TestClusterPortAllocator.Dispose(bool)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.testclusterportallocator/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.testclusterportallocator/methods/)

[Source](https://github.com/dotnet/orleans/blob/b7a9e3e1c9c54b3cec3a467c5734bf7744541bcf/src/Orleans.TestingHost/TestClusterPortAllocator.cs#L52-L72)

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

Releases unmanaged and - optionally - managed resources.

### Parameters

- `disposing` (`bool`): `true` to release both managed and unmanaged resources; `false` to release only unmanaged resources.
