lua-users home
lua-l archive

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

On Fri, Dec 2, 2011 at 4:34 PM, Jose <> wrote:
> On Fri, Dec 2, 2011 at 12:01 PM, Justin Cormack
> <> 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 ?