lua-users home
lua-l archive

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


On Wed, May 12, 2010 at 9:33 PM, King, Mike <MKing@klmicrowave.com> wrote:
> My C++ program calls a Lua function with a "wrapped" C++ object as one of its parameters.  When the Lua function returns, the object is deleted.  How can I prevent future Lua calls from accessing the now invalid object?

Could you just remove the metatable of the userdata object (or change
it to a special "dead object" metatable)?

-Duncan