summaryrefslogtreecommitdiff
path: root/server/src/core/vm.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-01-10 09:07:41 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-01-10 09:07:41 +0800
commitdb88a4edc504f498d8488a777249f4b13a634188 (patch)
tree30988df5e9f9a740023d8af6c86540de32ed524b /server/src/core/vm.lua
parent6de4a30d3893d36a5a766aef920e5ef55f6241e2 (diff)
downloadlua-language-server-db88a4edc504f498d8488a777249f4b13a634188.zip
释放掉一些没用的资源
Diffstat (limited to 'server/src/core/vm.lua')
-rw-r--r--server/src/core/vm.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/src/core/vm.lua b/server/src/core/vm.lua
index 34df77a8..f4ab6091 100644
--- a/server/src/core/vm.lua
+++ b/server/src/core/vm.lua
@@ -1491,6 +1491,11 @@ local function compile(ast, lsp, uri)
-- 执行代码
vm:doActions(ast)
+ vm.scope = nil
+ vm.chunk = nil
+ vm.libraryValue = nil
+ vm.libraryChild = nil
+
return vm
end