Ken Takata wrote;

> 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:

Good catch!  It does look like the right solution.  I'll add a comment
about why it happens this way: When using the VAR_FUNC name we don't
copy but take over the value, thus should not increment the refcount.


-- 
hundred-and-one symptoms of being an internet addict:
96. On Super Bowl Sunday, you followed the score by going to the
    Yahoo main page instead of turning on the TV.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            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].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui