lua-users home
lua-l archive

Re: Garbage Collection

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


I now know exactly how the problem manifests.
I don't know the solution.
The problem is that the stmt(cursor) handle is
garbage collected in between fetches. i.e.
while (1) do
 row = CUR:Fetch()
 if not row then 
 break;
 end
-- CUR is garbage collected before next fetch
-- during dostuff()
 dostuff();
end
If I use lua_ref to lock the stmt(cursor) then things
are not gc'ed until the program terminates (which is not
good for stmt handles). Any ideas?
DB

AltStyle によって変換されたページ (->オリジナル) /