forked from MineClone5/MineClone5
Fix local name memory leak
This commit is contained in:
parent
a807ee6372
commit
1b511936f5
|
@ -6,14 +6,14 @@ local pool = {}
|
||||||
|
|
||||||
local tick = false
|
local tick = false
|
||||||
|
|
||||||
local name
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
|
local name
|
||||||
name = player:get_player_name()
|
name = player:get_player_name()
|
||||||
pool[name] = 0
|
pool[name] = 0
|
||||||
end)
|
end)
|
||||||
|
|
||||||
local name
|
|
||||||
minetest.register_on_leaveplayer(function(player)
|
minetest.register_on_leaveplayer(function(player)
|
||||||
|
local name
|
||||||
name = player:get_player_name()
|
name = player:get_player_name()
|
||||||
pool[name] = nil
|
pool[name] = nil
|
||||||
end)
|
end)
|
||||||
|
|
Loading…
Reference in New Issue