# Dispose(ref AtomicSafetyHandle, ref DisposeSentinel)

> Releases the AtomicSafetyHandle and clears the DisposeSentinel.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections.LowLevel.Unsafe](/engine/6000.3/script-reference/unity/collections/lowlevel/unsafe.md)
* **Assembly:** UnityEngine.CoreModule

## Dispose(AtomicSafetyHandle, DisposeSentinel)

```csharp
public static void Dispose(ref AtomicSafetyHandle safety, ref DisposeSentinel sentinel)
```

### Parameters

**** (\[AtomicSafetyHandle]\(/engine/6000.3/script-reference/unity/collections/lowlevel/unsafe/atomicsafetyhandle)): The `AtomicSafetyHandle` returned when invoking the **Create** method.**** (\[DisposeSentinel]\(/engine/6000.3/script-reference/unity/collections/lowlevel/unsafe/disposesentinel)): The `DisposeSentinel` to clear.

### Remarks

If the `AtomicSafetyHandle` can't be released, which usually happens either because a job is accessing the data or because the handle has already been released, an exception is thrown.
