# InProcessTestCluster.DeactivateAsync(IAddressable)

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

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/InProcTestCluster.cs#L225)

```csharp
public Task DeactivateAsync(IAddressable grain)
```

Deactivates the current activation of the specified grain and waits for deactivation to complete.

### Parameters

- `grain` (`IAddressable`): The grain to deactivate.

### Returns

A task that completes when the grain has been deactivated.

### Examples

```csharp
await cluster.DeactivateAsync(grain.GetGrainId());
```
