Problem: Vim9: memory leak when debugging a :def function.
Solution: Free the debug instructions.
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2989,
/**/
2988,
/**/
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)
{