[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Translating Linux C example to LuaJIT
- From: Jose <jmalv04@...>
- Date: Sun, 4 Dec 2011 11:56:31 +0100
On Fri, Dec 2, 2011 at 4:34 PM, Jose <jmalv04@gmail.com> wrote:
> On Fri, Dec 2, 2011 at 12:01 PM, Justin Cormack
> <justin@specialbusservice.com> wrote:
>
>> If you add collectgarbage() after the request stage and before get replies
>> you get a free error every time - storing a pointer to a Lua reference in a
>> C struct does not stop Lua freeing it... You allocate host2.ar_name for
>> example as a copy of query (you can just use query directly here) and so
>> that gets garbage collected.
Thanks Justin, I fixed the the whole example now.
Is there any info on the collectgarbage() output when it finds free errors ?
regards
jose