[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Generating a Lua function in C
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 4 Feb 2009 08:59:39 -0200
> I was paranoid about not screwing up the memory management/garbage collection
Rightly so.
> f->k[i]=L->base[2];
>
> Is this really safe? Even for a string? How does the garbage collector know
> about this reference?
That assignment is copying TValues, not complete data.
The GC in Lua is not done by reference counting. It's mark-and-sweep.
Anyway, that code of mine is experimental software at best.