To: vim_dev@googlegroups.com Subject: Patch 8.2.2989 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2989 Problem: Vim9: memory leak when debugging a :def function. Solution: Free the debug instructions. Files: src/vim9compile.c *** ../vim-8.2.2988/src/vim9compile.c 2021-06-13 14:15:26.522510754 +0200 --- src/vim9compile.c 2021-06-13 15:37:20.114988987 +0200 *************** *** 10045,10050 **** --- 10045,10057 ---- VIM_CLEAR(dfunc->df_instr); dfunc->df_instr = NULL; } + if (dfunc->df_instr_debug != NULL) + { + for (idx = 0; idx < dfunc->df_instr_debug_count; ++idx) + delete_instr(dfunc->df_instr_debug + idx); + VIM_CLEAR(dfunc->df_instr_debug); + dfunc->df_instr_debug = NULL; + } #ifdef FEAT_PROFILE if (dfunc->df_instr_prof != NULL) { *** ../vim-8.2.2988/src/version.c 2021-06-13 15:15:58.412822225 +0200 --- src/version.c 2021-06-13 15:38:43.622653018 +0200 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2989, /**/ -- A village. Sound of chanting of Latin canon, punctuated by short, sharp cracks. It comes nearer. We see it is a line of MONKS ala SEVENTH SEAL flagellation scene, chanting and banging themselves on the foreheads with wooden boards. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///