mirror of
https://github.com/neovim/neovim.git
synced 2025-09-24 20:18:32 +00:00
vim-patch:8.1.1007: using closure may consume a lot of memory
Problem: Using closure may consume a lot of memory.
Solution: unreference items that are no longer needed. Add a test. (Ozaki
Kiichi, closes vim/vim#3961)
209b8e3e3b
This commit is contained in:
@@ -442,7 +442,8 @@ void eval_clear(void)
|
||||
// unreferenced lists and dicts
|
||||
(void)garbage_collect(false);
|
||||
|
||||
// functions
|
||||
// functions need to be freed before gargabe collecting, otherwise local
|
||||
// variables might be freed twice.
|
||||
free_all_functions();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user