Table of Contents

Class LuauChunk

Namespace
LuauInterop
Assembly
LuauInterop.dll

Represents a compiled Luau chunk, which is a block of bytecode that can be loaded into a Lua State.

public class LuauChunk : IDisposable
Inheritance
LuauChunk
Implements
Inherited Members

Constructors

LuauChunk(nint, nuint)

Represents a compiled Luau chunk, which is a block of bytecode that can be loaded into a Lua State.

public LuauChunk(nint pointer, nuint size)

Parameters

pointer nint
size nuint

Properties

IsDisposed

public bool IsDisposed { get; }

Property Value

bool

Pointer

The pointer to the compiled chunk in unmanaged memory.

public nint Pointer { get; }

Property Value

nint

Size

The size of the compiled chunk in bytes.

public nuint Size { get; }

Property Value

nuint

Methods

AsSpan()

Returns the compiled chunk as a read-only span of bytes.

public Span<byte> AsSpan()

Returns

Span<byte>

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

~LuauChunk()

protected ~LuauChunk()

ToByteArray()

Returns the compiled chunk as a byte array.

public byte[] ToByteArray()

Returns

byte[]