mirror of
https://github.com/neovim/neovim.git
synced 2025-09-24 03:58:32 +00:00
vim-patch:7.4.1719
Problem: Leaking memory when there is a cycle involving a job and a
partial.
Solution: Add a copyID to job and channel. Set references in items referred
by them. Go through all jobs and channels to find unreferenced
items. Also, decrement reference counts when garbage collecting.
107e1eef1d
This commit is contained in:

committed by
James McCoy

parent
e97e24c77e
commit
25438f149f
@@ -657,7 +657,7 @@ bool object_to_vim(Object obj, typval_T *tv, Error *err)
|
||||
if (!object_to_vim(item, &li->li_tv, err)) {
|
||||
// cleanup
|
||||
listitem_free(li);
|
||||
list_free(list, true);
|
||||
list_free(list);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -681,7 +681,7 @@ bool object_to_vim(Object obj, typval_T *tv, Error *err)
|
||||
api_set_error(err, Validation,
|
||||
_("Empty dictionary keys aren't allowed"));
|
||||
// cleanup
|
||||
dict_free(dict, true);
|
||||
dict_free(dict);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -690,7 +690,7 @@ bool object_to_vim(Object obj, typval_T *tv, Error *err)
|
||||
if (!object_to_vim(item.value, &di->di_tv, err)) {
|
||||
// cleanup
|
||||
dictitem_free(di);
|
||||
dict_free(dict, true);
|
||||
dict_free(dict);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user