0
0
mirror of https://github.com/vim/vim.git synced 2025-10-07 05:54:16 -04:00

patch 8.2.1819: Vim9: Memory leak when using a closure

Problem:    Vim9: Memory leak when using a closure.
Solution:   Compute the mininal refcount in the funcstack.  Reenable disabled
            tests.
This commit is contained in:
Bram Moolenaar
2020-10-10 14:13:01 +02:00
parent 8956023920
commit 85d5e2b723
7 changed files with 143 additions and 110 deletions

View File

@@ -1869,8 +1869,11 @@ typedef struct funcstack_S
// - arguments
// - frame
// - local variables
int fs_var_offset; // count of arguments + frame size == offset to
// local variables
int fs_refcount; // nr of closures referencing this funcstack
int fs_min_refcount; // nr of closures on this funcstack
int fs_copyID; // for garray_T collection
} funcstack_T;