[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: using light userdata to keep full userdata alive?
- From: Norman Ramsey <nr@...>
- Date: Tue, 08 Jan 2008 20:35:47 -0500
>
> I would put the light userdata into registry, pointing to the real one.
>
> LUA_REGISTRYINDEX[ light_ud ] = real_ud
>
> Once you don't need a certain light userdata any more, its registry
> entry should be cleared.
How do I know? It sounds as if light userdata aren't visible to the
garbage collector. The last thing I want to do is create an API
which requires manual memory management. I'd be thrown out of my guild :-)
It sounds like I will have to stick with full userdata. A pity, but
it can't be helped.
Norman