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:
Michael Ennen
2016-10-30 15:10:11 -07:00
committed by James McCoy
parent e97e24c77e
commit 25438f149f
6 changed files with 162 additions and 114 deletions

View File

@@ -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;
}