lua-users home
lua-l archive

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


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.