summaryrefslogtreecommitdiff
path: root/server/src/vm
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-04-10 23:35:53 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-04-10 23:35:53 +0800
commitd41a0e2b8e405c30fb053b74fd1bc09ae3a0e6da (patch)
tree3b32b7f6e79473075f803a0a0bbbf0ab0802e57e /server/src/vm
parentfe30397aa8478a4e90c5c5caf43a164821905bb6 (diff)
downloadlua-language-server-d41a0e2b8e405c30fb053b74fd1bc09ae3a0e6da.zip
修正一处泄漏:全局变量合并时,需要递归标记子域为全局,以便之后进行清理
Diffstat (limited to 'server/src/vm')
-rw-r--r--server/src/vm/value.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/vm/value.lua b/server/src/vm/value.lua
index ea16559a..95eb0192 100644
--- a/server/src/vm/value.lua
+++ b/server/src/vm/value.lua
@@ -354,6 +354,9 @@ function mt:mergeValue(value)
list[#list+1] = bc
end
end
+ if global then
+ bc:markGlobal()
+ end
a._child[k] = bc
end
end