# AllocatorManager.AllocatorHandle

> Represents the allocator function used within an allocator.

## Definition

* **Type:** Struct
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.ManagedKernelModule
* **Implements:** [IAllocator](/engine/6000.7/script-reference/unity/collections/allocatormanager/iallocator.md), [IDisposable](https://learn.microsoft.com/dotnet/api/system.idisposable), [IEquatable\<AllocatorHandle>](https://learn.microsoft.com/dotnet/api/system.iequatable-1), [IComparable\<AllocatorHandle>](https://learn.microsoft.com/dotnet/api/system.icomparable-1)

```csharp
public struct AllocatorManager.AllocatorHandle : AllocatorManager.IAllocator, IDisposable, IEquatable<AllocatorManager.AllocatorHandle>, IComparable<AllocatorManager.AllocatorHandle>
```

## Fields

| Value                                                                                                    | Description                                                          |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| [Index](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle/index.md)     | This allocator's index into the global table of allocator functions. |
| [Version](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle/version.md) | This allocator's version number.                                     |

## Static Fields

| Value                                                                                                                                                | Description            |
| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- |
| [InvalidChildAllocatorIndex](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle/invalidchildallocatorindex.md)       | For internal use only. |
| [InvalidChildSafetyHandleIndex](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle/invalidchildsafetyhandleindex.md) | For internal use only. |

## Properties

| Property                                                                                                                     | Description                                                                                                                                            |
| ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [Function](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle/function.md)                   | For internal use only.                                                                                                                                 |
| [Handle](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle/handle.md)                       | This handle.                                                                                                                                           |
| [IsAutoDispose](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle/isautodispose.md)         | Check whether this allocator will automatically dispose allocations.                                                                                   |
| [IsCustomAllocator](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle/iscustomallocator.md) | Check whether this allocator is a custom allocator.                                                                                                    |
| [ToAllocator](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle/toallocator.md)             | Retrieve the Allocator associated with this allocator handle.                                                                                          |
| [Value](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle/value.md)                         | The [AllocatorManager.AllocatorHandle.Index](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle/index.md) cast to int. |

## Methods

| Method                                                                                                                     | Description                                                                                                                                                                                           |
| -------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [AllocateBlock](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle/allocateblock.md)       | Allocates a block with this allocator function.                                                                                                                                                       |
| [CompareTo](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle/compareto.md)               | Compare this [AllocatorManager.AllocatorHandle](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle.md) against a given one                                            |
| [Dispose](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle/dispose.md)                   | Dispose the allocator.                                                                                                                                                                                |
| [Equals](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle/equals.md)                     | [AllocatorManager.AllocatorHandle](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle.md) instances are equal if they refer to the same instance at the same version. |
| [GetHashCode](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle/gethashcode.md)           | A hash used for comparisons.                                                                                                                                                                          |
| [Try](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle/try.md)                           | Tries to allocate the block with this allocator.                                                                                                                                                      |
| [TryAllocateBlock](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle/tryallocateblock.md) | Allocates a block from this allocator.                                                                                                                                                                |

## Operators

| Operator                                                                                                                   | Description                                                                                                                                                                       |
| -------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [operator ==](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle/op-equality.md)           | Evaluates if one [AllocatorManager.AllocatorHandle](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle.md) is equal to the other.                 |
| [operator >](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle/op-greaterthan.md)         | Evaluates if one [AllocatorManager.AllocatorHandle](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle.md) is greater than the other.             |
| [operator >=](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle/op-greaterthanorequal.md) | Evaluates if one [AllocatorManager.AllocatorHandle](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle.md) is greater than or equal to the other. |
| [AllocatorHandle](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle/op-implicit.md)       | Implicitly convert an Allocator to an AllocatorHandle with its Version being reset to 0.                                                                                          |
| [operator !=](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle/op-inequality.md)         | Evaluates if one [AllocatorManager.AllocatorHandle](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle.md) is not equal to the other.             |
| [operator \<](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle/op-lessthan.md)           | Evaluates if one [AllocatorManager.AllocatorHandle](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle.md) is less than the other.                |
| [operator \<=](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle/op-lessthanorequal.md)   | Evaluates if one [AllocatorManager.AllocatorHandle](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle.md) is less than or equal to the other.    |
