lua-users home
lua-l archive

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


I would expect the same. It is not what I observe.
My frustration soars (in case you have not picked 
up on this already).

dostuff() simply prints the row members.

From: "Edgar Toernig" <froese@gmx.de>
> David Burgess wrote:
> > 
> > while (1) do
> >   row = CUR:Fetch()
> >   if not row then
> >      break;
> >   end
> > -- CUR is garbage collected before next fetch
> > -- during dostuff()
> >   dostuff();
> > end
> 
> Unless dostuff overwrites CUR the GC will not collect it.
> The GC will only collect unreachable items.  And the object
> stored in CUR is definitely reachable...
> 
> Ciao, ET.
>