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
Properties
IsDisposed
public bool IsDisposed { get; }
Property Value
Pointer
The pointer to the compiled chunk in unmanaged memory.
public nint Pointer { get; }
Property Value
Size
The size of the compiled chunk in bytes.
public nuint Size { get; }
Property Value
Methods
AsSpan()
Returns the compiled chunk as a read-only span of bytes.
public Span<byte> AsSpan()
Returns
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
disposingbool
~LuauChunk()
protected ~LuauChunk()
ToByteArray()
Returns the compiled chunk as a byte array.
public byte[] ToByteArray()
Returns
- byte[]