diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-03-29 21:17:38 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-03-29 21:17:38 +0800 |
commit | 875e12a867b25f2f1cd0587c3f26d81378ac1310 (patch) | |
tree | 8f190a561a2ac544c795f8da67c7c2e0d9d24317 /server/src/vm | |
parent | 2fbee407c5a436a91ceb6053ccd3d98216382490 (diff) | |
download | lua-language-server-875e12a867b25f2f1cd0587c3f26d81378ac1310.zip |
加个泄漏的TODO,晚点想个优雅的解决方案
Diffstat (limited to 'server/src/vm')
-rw-r--r-- | server/src/vm/value.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/vm/value.lua b/server/src/vm/value.lua index 1f6c52a3..84ee4444 100644 --- a/server/src/vm/value.lua +++ b/server/src/vm/value.lua @@ -281,6 +281,9 @@ function mt:mergeValue(value) end value._type = self._type + -- TODO: 这里有一处泄漏:value 的 child 只在 eachChild 与 rawEach 时清理 + -- 而 child 的 key 有可能是对象,反复合并会导致 child 越来越大 + -- 目前只有 function:mergeReturn 会调用 mergeValue ,因此表现不明显 if value._child then if not self._child then self._child = {} |