# 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.7/script-reference/unity/collections/lowlevel/unsafe.md)
* **Assembly:** UnityEngine.ManagedKernelModule

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

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

### Parameters

**** (\[AtomicSafetyHandle]\(/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe/atomicsafetyhandle)): The [AtomicSafetyHandle](/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe/atomicsafetyhandle.md) to control access to the data related to the newly created [DisposeSentinel](/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe/disposesentinel.md).**** (\[DisposeSentinel]\(/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe/disposesentinel)): The new [DisposeSentinel](/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe/disposesentinel.md).**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The stack depth where to extract the logging information from.**** (\[Allocator]\(/engine/6000.7/script-reference/unity/collections/allocator)): The allocator used for the native data being tracked.

### Remarks

When [DisposeSentinel](/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe/disposesentinel.md) is created, the call stack is stored in it to log a descriptive error when a memory leak is detected.
