lua-users home
lua-l archive

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


> Good point.  If new Value objects are always initialized to nil, then
> that should take care of creation.  I suppose that's not already being
> done though.

But we need a different kind of "setnil". For reference counting, the
usual "setnil" must decrement the count of the previous value, but
the "setnil" of a new reference cannot do that.


> For destruction of non-stack references, it would suffice to set all
> Values to nil with setnilvalue() when they are destroyed.  I suppose
> this also is not being done currently, but then I haven't looked.

Destruction of non-stack references ocurr mainly when Lua destroys an
object, so this is already controled by the garbage collector.

-- Roberto