lua-users home
lua-l archive

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


> I have tried forcing several collections manually on the C side after that
> call and the userdata are not collected, there are no more references to
> that userdata as the one shown in the snippets that's why i feel i am
> missing something.
> 
> I was thinking that maybe since the coroutine is in a yield status in that
> and since it has the "self" parameter it keeps a reference to the "tableref"
> that will never be cleared?
> What would be the right approach in the case? I know that coroutines cannot
> be killed manually.

Did you see the problem in the code you sent, or only in the original,
non-simplified code?  I ran the code that you sent, and 'tableref' is
being collected the first time the GC runs.

-- Roberto