
Ü
NOTE Unlike C++, Lua handles memory management automatically. It uses
something called a garbage collector to periodically delete all the dead objects.
The performance of the garbage collector can be customized to your taste,
ranging from immediate deletion of dead objects to no deletion. See the Lua
documentation for further details.
Exposing a C/C++ Class to Lua
This is where things start to get tricky! Exposing a C++ class to a Lua
script can be pretty gnarly. You basically have to create a Lua table that has
as its elements the class data and methods you require to expose. You may
also have to create a metatable that defines how your class behaves ...