docs.unity.cn
    Show / Hide Table of Contents

    Struct DoubleRewindableAllocators

    A double rewindable allocators RewindableAllocator.

    Namespace: Unity.Collections
    Syntax
    public struct DoubleRewindableAllocators : IDisposable

    Constructors

    DoubleRewindableAllocators(AllocatorManager.AllocatorHandle, Int32)

    Construct a double rewindable allocators by allocating the allocators from backingAllocator and registering them.

    Declaration
    public DoubleRewindableAllocators(AllocatorManager.AllocatorHandle backingAllocator, int initialSizeInBytes)
    Parameters
    Type Name Description
    AllocatorManager.AllocatorHandle backingAllocator

    Allocator used to allocate the double rewindable allocators.

    Int32 initialSizeInBytes

    The initial capacity of the allocators, in bytes

    Properties

    Allocator

    Retrieve the current rewindable allocator.

    Declaration
    public readonly ref RewindableAllocator Allocator { get; }
    Property Value
    Type Description
    RewindableAllocator

    The Allocator retrieved.

    IsCreated

    Check whether the double rewindable allocators is created.

    Declaration
    public readonly bool IsCreated { get; }
    Property Value
    Type Description
    Boolean

    True if current allocator is not null, otherwise false.

    Methods

    Dispose()

    the double rewindable allocators and unregister it.

    Declaration
    public void Dispose()

    Initialize(AllocatorManager.AllocatorHandle, Int32)

    Initialize a double rewindable allocators by allocating the allocators from backingAllocator and registering them.

    Declaration
    public void Initialize(AllocatorManager.AllocatorHandle backingAllocator, int initialSizeInBytes)
    Parameters
    Type Name Description
    AllocatorManager.AllocatorHandle backingAllocator

    Allocator used to allocate the double rewindable allocators.

    Int32 initialSizeInBytes

    The initial capacity of the allocators, in bytes

    Update()

    Update the double rewindable allocators, switch Pointer to another allocator and rewind the newly switched allocator.

    Declaration
    public void Update()
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Thursday, May 11, 2023