lua-users home
lua-l archive

Re: lua 5.4 calls __gc twice, sometimes

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


i've let the test suite run literally millions of times now, the bug never repros when i change my proxy __gc 
before:
__gc = function(self)
 local u = cache[self]
 cache[self] = nil
 userdata.dispose(u)
end
after:
__gc = function(self)
 local u = cache[self]
 -- cache[self] = nil
 userdata.dispose(u)
end
(again, note that the cache is a weak table (mode k))
_______________________________________________
lua-l mailing list -- lua-l@lists.lua.org
To unsubscribe send an email to lua-l-leave@lists.lua.org

AltStyle によって変換されたページ (->オリジナル) /