[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Nil-ing userdata
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Fri, 22 Oct 2010 16:02:55 -0200
> s:deleteMass(m);
> m = nil;
> but in one call.
> Can I set the "m" userdata to nil from the lua C API?
No. But you can remove m's metatable in deleteMass. Then it'll be a completely
useless and harmless userdata value. Using it later in Lua code will most
probably raise an error, which is (partr of) what setting it to nil would do.