# Create(out AtomicSafetyHandle, out DisposeSentinel, int, Allocator)

> Creates a new AtomicSafetyHandle and a new DisposeSentinel, to be used to track safety and leaks on native data.

## Definition

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

## Create(AtomicSafetyHandle, DisposeSentinel, int, Allocator)

```csharp
public static void Create(out AtomicSafetyHandle safety, out DisposeSentinel sentinel, int callSiteStackDepth, Allocator allocator)
```

### Parameters

**** (\[AtomicSafetyHandle]\(/engine/6000.3/script-reference/unity/collections/lowlevel/unsafe/atomicsafetyhandle)): The `AtomicSafetyHandle` to control access to the data related to the newly created `DisposeSentinel`.**** (\[DisposeSentinel]\(/engine/6000.3/script-reference/unity/collections/lowlevel/unsafe/disposesentinel)): The new `DisposeSentinel`.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The stack depth where to extract the logging information from.**** (\[Allocator]\(/engine/6000.3/script-reference/unity/collections/allocator)):&#x20;

### Remarks

When `DisposeSentinel` is created, the call stack is stored in it to log a descriptive error when a memory leak is detected.
