CL_LuaReference3
Lua reference
Overview
If the user needs to store references to LuaObject, this reference must be explicitly created, creating objects of this class.
Inherited from public CL_LuaObject
Class members
CL_LuaReference(-
void)
CL_LuaReference(-
const CL_LuaObject& obj, int lock=0)
- void
ref( -
const CL_LuaObject& obj, int lock=0)
- void
unref( -
void)
Members with descriptions
CL_LuaReference(-
void)
Description:
Create a reference to a nil object (default)
CL_LuaReference(-
const CL_LuaObject& obj, int lock=0)
Parameters: lock - to lock or not to lock, that is the question
Description:
Create a reference to the given Lua object An optinal parameter specifies if the reference is not to be garbage collected by Lua. The default, {lock=0}, means the reference becomes invalid if Lua collects the referenced object.
- void
ref( -
const CL_LuaObject& obj, int lock=0)
Description:
Replace the reference This method allows the user to replace the referenced object; it is useful when the object is created with the default constructor. _Note_: if there is already a reference to a non-'nil' object, this reference, if not used by other LuaReference objets, should be eliminated (using the 'unref' method) before calling this method.
- void
unref( -
void)
Description:
Unreference an object