[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Limiting access to variables
- From: Duncan Cross <duncan.cross@...>
- Date: Wed, 12 May 2010 22:13:13 +0100
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