Struct MemoryHeader<T> | Kinematica | 0.5.0-preview.1
docs.unity.cn
    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 © 2020 Unity Technologies
    Generated by DocFX