# DoubleRewindableAllocators

> A double rewindable allocators RewindableAllocator.

## Definition

* **Type:** Struct
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.ManagedKernelModule
* **Implements:** [IDisposable](https://learn.microsoft.com/dotnet/api/system.idisposable)

```csharp
public struct DoubleRewindableAllocators : IDisposable
```

## Constructors

| Constructor                                                                                                                                                                         | Description                                                                                                       |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| [DoubleRewindableAllocators(Unity.Collections.AllocatorManager.AllocatorHandle,System.Int32)](/engine/6000.7/script-reference/unity/collections/doublerewindableallocators/ctor.md) | Construct a double rewindable allocators by allocating the allocators from backingAllocator and registering them. |

## Properties

| Property                                                                                               | Description                                                |
| ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------- |
| [Allocator](/engine/6000.7/script-reference/unity/collections/doublerewindableallocators/allocator.md) | Retrieve the current rewindable allocator.                 |
| [IsCreated](/engine/6000.7/script-reference/unity/collections/doublerewindableallocators/iscreated.md) | Check whether the double rewindable allocators is created. |

## Methods

| Method                                                                                                   | Description                                                                                                           |
| -------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| [Dispose](/engine/6000.7/script-reference/unity/collections/doublerewindableallocators/dispose.md)       | the double rewindable allocators and unregister it.                                                                   |
| [Initialize](/engine/6000.7/script-reference/unity/collections/doublerewindableallocators/initialize.md) | Initialize a double rewindable allocators by allocating the allocators from backingAllocator and registering them.    |
| [Update](/engine/6000.7/script-reference/unity/collections/doublerewindableallocators/update.md)         | Update the double rewindable allocators, switch Pointer to another allocator and rewind the newly switched allocator. |
