lua-users home
lua-l archive

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


On Tue, Dec 14, 2010 at 1:45 PM, Zed Shaw <zed.shaw@gmail.com> wrote:
> Any ideas on how to do that?  If it's not possible then I'll probably
> ditch the weak table in favor of something I control myself.

that's the best way.

not only weak tables don't notify eviction, but garbage isn't
collected at the first opportunity.  that means that unreachable
values can stay in memory and __gc not called for arbitrary long
times.

if you need something finalized, it's usually better to finalize it yourself.

-- 
Javier