From 8179d68dc1a90f47bfb307d73e71adc98883ae00 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Sun, 13 Aug 2023 08:03:56 +0100 Subject: fix(treesitter): logger memory leak --- src/nvim/lua/executor.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/nvim/lua/executor.c') diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c index 9215926434..459c69f385 100644 --- a/src/nvim/lua/executor.c +++ b/src/nvim/lua/executor.c @@ -1302,6 +1302,9 @@ LuaRef nlua_ref(lua_State *lstate, nlua_ref_state_t *ref_state, int index) return ref; } +// TODO(lewis6991): Currently cannot be run in __gc metamethods as they are +// invoked in lua_close() which can be invoked after the ref_markers map is +// destroyed in nlua_common_free_all_mem. LuaRef nlua_ref_global(lua_State *lstate, int index) { return nlua_ref(lstate, nlua_global_refs, index); -- cgit