summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.lua3
-rw-r--r--src/lsp.lua2
2 files changed, 5 insertions, 0 deletions
diff --git a/main.lua b/main.lua
index 773fb0a8..893007d9 100644
--- a/main.lua
+++ b/main.lua
@@ -13,6 +13,9 @@ dbg:start()
require 'utility'
require 'global_protect'
+
+collectgarbage 'stop'
+
local service = require 'service'
local session = service()
diff --git a/src/lsp.lua b/src/lsp.lua
index cc35cf39..4a88aba6 100644
--- a/src/lsp.lua
+++ b/src/lsp.lua
@@ -79,6 +79,8 @@ function mt:_readAsContent(header)
if not response then
log.error(err or ('没有回应:' .. method))
end
+ -- 运行时不清理垃圾,在回复前端之后清理垃圾
+ collectgarbage()
end
function mt:setInput(input)