> In experiments I noticed that sometimes > the __gc call happens slightly after a weak value is removed from the table > and in this gap a new value may be created. I told you that [1]. [1] http://lua-users.org/lists/lua-l/2015-01/msg00172.html -- Roberto