# Equals

> AllocatorManager.AllocatorHandle instances are equal if they refer to the same instance at the same version.

## Definition

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

## Equals(Object)

[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.

```csharp
public override bool Equals(object obj)
```

### Parameters

**** (\[Object]\(https\://learn.microsoft.com/dotnet/api/system.object)): Object containing an [AllocatorManager.AllocatorHandle](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle.md).

### Returns

| Type                                                          | Description                                                                                            |
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true if both handles are for the same allocator instance at the same version, otherwise false. |

## Equals(AllocatorHandle)

[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.

```csharp
public bool Equals(AllocatorManager.AllocatorHandle other)
```

### Parameters

**** (\[AllocatorHandle]\(/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle)): [AllocatorManager.AllocatorHandle](/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle.md) to compare against.

### Returns

| Type                                                          | Description                                                                                            |
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true if both handles are for the same allocator instance at the same version, otherwise false. |

## Equals(Allocator)

[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.

```csharp
public bool Equals(Allocator other)
```

### Parameters

**** (\[Allocator]\(/engine/6000.7/script-reference/unity/collections/allocator)): [Allocator](/engine/6000.7/script-reference/unity/collections/allocator.md) to compare against.

### Returns

| Type                                                          | Description                                                                                            |
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true if both handles are for the same allocator instance at the same version, otherwise false. |
