Hi,
The last assert_false() in the following script fails after 7.4.1577:
(This is reported by Thinca.)
let obj = {}
function! obj.func() abort
endfunction
let funcnumber = matchstr(string(obj.func), '^function(''\zs.\{-}\ze''')
call assert_true(exists('*{' . funcnumber . '}'))
unlet obj
call assert_false(exists('*{' . funcnumber . '}'))
It seems that obj.func() is not freed.
I think that the following patch fixes the problem, but I'm not sure:
--- a/src/eval.c
+++ b/src/eval.c
@@ -12038,6 +12038,7 @@ partial_free(partial_T *pt)
clear_tv(&pt->pt_argv[i]);
vim_free(pt->pt_argv);
func_unref(pt->pt_name);
+ dict_unref(pt->pt_dict);
vim_free(pt->pt_name);
vim_free(pt);
}
@@ -21846,9 +21847,9 @@ handle_subscript(
copy_tv(&ret_pt->pt_argv[i], &pt->pt_argv[i]);
}
}
+ func_ref(pt->pt_name);
partial_unref(ret_pt);
}
- func_ref(pt->pt_name);
rettv->v_type = VAR_PARTIAL;
rettv->vval.v_partial = pt;
}
Regards,
Ken Takata
--
--
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].
For more options, visit https://groups.google.com/d/optout.