summaryrefslogtreecommitdiff
path: root/src/vim9.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-05-03 15:38:16 +0200
committerBram Moolenaar <Bram@vim.org>2020-05-03 15:38:16 +0200
commitf7779c63d4fe531e2483502d4441f24802342768 (patch)
tree1d630be90ef6aa51ec11ce5eac248dcd92acb041 /src/vim9.h
parent5adc55cb746893c6ddf7865ff654582902dee2e3 (diff)
downloadvim-git-f7779c63d4fe531e2483502d4441f24802342768.tar.gz
patch 8.2.0684: Vim9: memory leak when using lambdav8.2.0684
Problem: Vim9: memory leak when using lambda. Solution: Move the funccal context to the partial. Free the function when exiting.
Diffstat (limited to 'src/vim9.h')
-rw-r--r--src/vim9.h20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/vim9.h b/src/vim9.h
index befa6a74c..aac776af1 100644
--- a/src/vim9.h
+++ b/src/vim9.h
@@ -260,21 +260,6 @@ struct isn_S {
};
/*
- * Structure to hold the context of a compiled function, used by closures
- * defined in that function.
- */
-typedef struct funcstack_S
-{
- garray_T fs_ga; // contains the stack, with:
- // - arguments
- // - frame
- // - local variables
-
- int fs_refcount; // nr of closures referencing this funcstack
- int fs_copyID; // for garray_T collection
-} funcstack_T;
-
-/*
* Info about a function defined with :def. Used in "def_functions".
*/
struct dfunc_S {
@@ -286,11 +271,6 @@ struct dfunc_S {
isn_T *df_instr; // function body to be executed
int df_instr_count;
- garray_T *df_ectx_stack; // where compiled closure finds local vars
- int df_ectx_frame; // index of function frame in uf_ectx_stack
- funcstack_T *df_funcstack; // copy of stack for closure, used after
- // closure context function returns
-
int df_varcount; // number of local variables
int df_closure_count; // number of closures created
};