升级全局变量泄露检测代码
This commit is contained in:
8
main.lua
8
main.lua
@@ -9,6 +9,9 @@
|
|||||||
]]--
|
]]--
|
||||||
|
|
||||||
|
|
||||||
|
--Var leak check
|
||||||
|
-- setmetatable(_G,{__newindex=function(self,k,v)print('>>'..k)print(debug.traceback():match"\n.-\n\t(.-): ")rawset(self,k,v)end})
|
||||||
|
|
||||||
--Declaration
|
--Declaration
|
||||||
goto REM love=require"love"::REM::--Just tell IDE to load love-api, no actual usage
|
goto REM love=require"love"::REM::--Just tell IDE to load love-api, no actual usage
|
||||||
local fs=love.filesystem
|
local fs=love.filesystem
|
||||||
@@ -327,7 +330,4 @@ do
|
|||||||
if autoRestart then
|
if autoRestart then
|
||||||
love.event.quit("restart")
|
love.event.quit("restart")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--Var leak check
|
|
||||||
-- setmetatable(_G,{__newindex=function(self,k,v)print('>>'..k,tostring(v))rawset(self,k,v)end})
|
|
||||||
Reference in New Issue
Block a user