docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface AllocatorManager.IAllocator

    An allocator function pointer.

    Namespace: Unity.Collections
    Assembly: Unity.Collections.dll
    Syntax
    public interface AllocatorManager.IAllocator

    Properties

    Function

    The allocator function. It can allocate, deallocate, or reallocate.

    Declaration
    AllocatorManager.TryFunction Function { get; }
    Property Value
    Type Description
    AllocatorManager.TryFunction

    Handle

    This allocator.

    Declaration
    AllocatorManager.AllocatorHandle Handle { get; set; }
    Property Value
    Type Description
    AllocatorManager.AllocatorHandle

    This allocator.

    IsAutoDispose

    Check whether an allocator will automatically dispose allocations.

    Declaration
    bool IsAutoDispose { get; }
    Property Value
    Type Description
    bool
    Remarks

    Allocations made by allocator are not automatically disposed by default.

    IsCustomAllocator

    Check whether an allocator is a custom allocator

    Declaration
    bool IsCustomAllocator { get; }
    Property Value
    Type Description
    bool

    ToAllocator

    Cast the Allocator index into Allocator

    Declaration
    Allocator ToAllocator { get; }
    Property Value
    Type Description
    Allocator

    Methods

    Try(ref Block)

    Invoke the allocator function.

    Declaration
    int Try(ref AllocatorManager.Block block)
    Parameters
    Type Name Description
    AllocatorManager.Block block

    The block to allocate, deallocate, or reallocate. See Try(ref Block)

    Returns
    Type Description
    int

    0 if successful. Otherwise, returns the error code from the allocator function.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)