lua-users home
lua-l archive

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

Thank you very much.
That does it somehow.

But still (if I understand it correctly) that doesn't necessarily mean that the old m userdata is being garbage collected.
Is this right?
Is there a possibility to "force" the garbage collection?



Il giorno 22/ott/2010, alle ore 20.02, Luiz Henrique de Figueiredo ha scritto:

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