Tao.Lua SDK Documentation

Lua.lua_newuserdata Method 

This function allocates a new block of memory with the given size, pushes onto the stack a new full userdata with the block address, and returns this address.

[Visual Basic]
Public Shared Function lua_newuserdata( _
   ByVal L As IntPtr, _
   ByVal sz As UInt32 _
) As IntPtr
[C#]
public static IntPtr lua_newuserdata(
   IntPtr L,
   uint sz
);

Parameters

L
sz

Return Value

Remarks

Userdata represents C values in Lua. A full userdata represents a block of memory. It is an object (like a table): you must create it, it can have its own metatable, and you can detect when it is being collected. A full userdata is only equal to itself (under raw equality). When Lua collects a full userdata with a gc metamethod, Lua calls the metamethod and marks the userdata as finalized. When this userdata is collected again then Lua frees its corresponding memory.

See Also

Lua Class | Tao.Lua Namespace