docs.unity.cn
    Show / Hide Table of Contents

    Struct AllocatorHelper<T>

    Provides a wrapper for custom allocator.

    Namespace: Unity.Collections
    Syntax
    public struct AllocatorHelper<T> : IDisposable where T : struct, AllocatorManager.IAllocator
    Type Parameters
    Name Description
    T

    Constructors

    AllocatorHelper(AllocatorManager.AllocatorHandle)

    Allocate the custom allocator from backingAllocator and register it.

    Declaration
    public AllocatorHelper(AllocatorManager.AllocatorHandle backingAllocator)
    Parameters
    Type Name Description
    AllocatorManager.AllocatorHandle backingAllocator

    Allocator used to allocate backing storage.

    Properties

    Allocator

    Get the custom allocator.

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

    Methods

    Dispose()

    Dispose the custom allocator backing memory and unregister it.

    Declaration
    public void Dispose()
    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Tuesday, June 14, 2022
    Terms of use