Patch 9.0.1125
Problem:    Memory leak when using class functions.
Solution:   Clear and free the array with class functions.
Files:      src/vim9class.c


*** ../vim-9.0.1124/src/vim9class.c     2023-01-01 12:58:29.470417543 +0000
--- src/vim9class.c     2023-01-01 14:08:39.318768288 +0000
***************
*** 975,980 ****
--- 975,987 ----
        }
        vim_free(cl->class_obj_members);
  
+       for (int i = 0; i < cl->class_class_function_count; ++i)
+       {
+           ufunc_T *uf = cl->class_class_functions[i];
+           func_clear_free(uf, FALSE);
+       }
+       vim_free(cl->class_class_functions);
+ 
        for (int i = 0; i < cl->class_obj_method_count; ++i)
        {
            ufunc_T *uf = cl->class_obj_methods[i];
*** ../vim-9.0.1124/src/version.c       2023-01-01 14:04:47.863216040 +0000
--- src/version.c       2023-01-01 14:09:32.910672794 +0000
***************
*** 697,698 ****
--- 697,700 ----
  {   /* Add new patch number below this line */
+ /**/
+     1125,
  /**/

-- 
ARTHUR: If you do not open these doors, we will take this castle by force ...
   [A bucket of slops land on ARTHUR.  He tries to retain his dignity.]
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230101141153.CC7C61C0AA3%40moolenaar.net.

Raspunde prin e-mail lui