a weak table does not need its keys removed

also, this apparently increases the chance for obscure edge case bugs in lua gc
This commit is contained in:
payonel 2020-04-24 12:10:06 -07:00
parent b9cc1663b2
commit ee8c2902e2

View File

@ -1093,7 +1093,6 @@ local userdataWrapper = {
end, end,
__gc = function(self) __gc = function(self)
local data = wrappedUserdata[self] local data = wrappedUserdata[self]
wrappedUserdata[self] = nil
userdata.dispose(data) userdata.dispose(data)
end, end,
-- This is the persistence protocol for userdata. Userdata is considered -- This is the persistence protocol for userdata. Userdata is considered