mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 18:41:09 +01:00
Merge pull request 'Fix local name memory leak' (#1456) from jordan4ibanez/MineClone2-PopSounds:master into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/1456
This commit is contained in:
commit
0b0a180343
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue