[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: lua_newuserdata() question
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 9 Aug 2001 13:58:31 -0300 (EST)
>does lua_newuserdata() still not create any references to the allocated
>memory? for example, if the userdata remains on the stack, but does not get
>assigned to a table does it get collected before it gets removed from the
No. Objects in the stack do not get collected.
>also, how does gc work for userdata created with this function. is a gc
>event generated for each reference collected, or when all references to the
>allocated memory are no longer in the state or on the stack?
GC tag methods are called for each object being freed, not for each reference