# Register<T>(ref T, bool, bool, int)

> Saves an allocator's function pointers in a free slot of the global function table. Thread safe.

## Definition

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

## Register\<T>(T, bool, bool, int)

```csharp
[ExcludeFromBurstCompatTesting("Uses managed delegate")]
public static void Register<T>(this ref T t, bool IsAutoDispose = false, bool isGlobal = false, int globalIndex = 0) where T : unmanaged, AllocatorManager.IAllocator
```

### Parameters

**** (T): Reference to the allocator.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Flag indicating if the allocator will automatically dispose allocations.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Flag indicating if the allocator is a global allocator.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Index into the global function table of the allocator to be created.
