lua-users home
lua-l archive

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


Hi,

> Keeping all references in the weak table is a good idea, I will
> do that. Still, I stand by my assertion that this is a critical
> function of an embedded language which should be a part of the
> library, not "emulated" in user code. But since I seem to be the
> only one concerned by it, I will go suffer in silence  ;)

You can, on the other hand, keep a strong reference, and unref it during
the garbage colection of your userdatum. That is, as long as you do not
reference it in the associated table, thus forming a cycle :-).

Regards,
Diego.