# CreateSafetyHandle(AllocatorHandle)

> Creates a new AtomicSafetyHandle that is valid until CollectionHelper.DisposeSafetyHandle is called.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.ManagedKernelModule

```csharp
public static AtomicSafetyHandle CreateSafetyHandle(AllocatorManager.AllocatorHandle allocator)
```

### Parameters

**** (\[AllocatorHandle]\(/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle)): The AllocatorHandle to use.

### Returns

| Type                                                                                                          | Description    |
| ------------------------------------------------------------------------------------------------------------- | -------------- |
| [AtomicSafetyHandle](/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe/atomicsafetyhandle.md) | Safety handle. |
