lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> What about destruction? Who is responsible for deallocating objects?

C++ manages everything by default. You can change this by

obj.__gc = obj.delete -- delete on collection
obj.__gc = nil -- do not delete on collection
obj:delete() -- explicitly delete. the object is now invalid