To: vim_dev@googlegroups.com Subject: Patch 8.2.2406 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2406 Problem: Vim9: profiled :def function leaks memory. Solution: Delete the profiled instructions. Files: src/vim9compile.c *** ../vim-8.2.2405/src/vim9compile.c 2021-01-24 20:51:56.784245253 +0100 --- src/vim9compile.c 2021-01-24 21:29:34.407122643 +0100 *************** *** 8837,8842 **** --- 8837,8851 ---- VIM_CLEAR(dfunc->df_instr); dfunc->df_instr = NULL; } + #ifdef FEAT_PROFILE + if (dfunc->df_instr_prof != NULL) + { + for (idx = 0; idx < dfunc->df_instr_prof_count; ++idx) + delete_instr(dfunc->df_instr_prof + idx); + VIM_CLEAR(dfunc->df_instr_prof); + dfunc->df_instr_prof = NULL; + } + #endif if (mark_deleted) dfunc->df_deleted = TRUE; *** ../vim-8.2.2405/src/version.c 2021-01-24 21:14:17.312631037 +0100 --- src/version.c 2021-01-24 21:30:15.282937484 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2406, /**/ -- hundred-and-one symptoms of being an internet addict: 231. You sprinkle Carpet Fresh on the rugs and put your vacuum cleaner in the front doorway permanently so it always looks like you are actually attempting to do something about that mess that has amassed since you discovered the Internet. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///