Struct MemoryHeader<T> | Kinematica | 0.5.0-preview.1
docs.unity3d.com
    Show / Hide Table of Contents

    Struct MemoryHeader<T>

    A memory header maintains a chunk of memory that contains an arbitrary collection of nested value types. This is a workaround for the inability to nest NativeArrays.

    Namespace: Unity.Kinematica
    Syntax
    public struct MemoryHeader<T> : IDisposable where T : struct
    Type Parameters
    Name Description
    T

    Properties

    IsValid

    Determines if the given memory header is valid or not.

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

    True if the memory header is valid; false otherwise.

    Ref

    Retrieves the original ref value from the memory header.

    Declaration
    public T Ref { get; }
    Property Value
    Type Description
    T

    Methods

    Create(ref T)

    Constructs a new memory reference from a ref value.

    Declaration
    public static MemoryRef<T> Create(ref T target)
    Parameters
    Type Name Description
    T target

    The ref value that this memory reference should be constructed for.

    Returns
    Type Description
    MemoryRef<T>

    Dispose()

    Disposes the underlying allocated memory of the memory header.

    Declaration
    public void Dispose()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023