diff options
-rw-r--r-- | main.lua | 3 | ||||
-rw-r--r-- | src/lsp.lua | 2 |
2 files changed, 5 insertions, 0 deletions
@@ -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) |