lua-users home
lua-l archive

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

> 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.