On Fri, Jan 20, 2012 at 9:45 AM, Luis Carvalho <[email protected]> wrote:
>> The patch causes crash.
>>
>> :lua x = vim.dict()
>>
>> :let x = luaeval("x")
>> :unlet x
>> :call garbagecollect()
>> :" waste memory to reuse memory used for x ...
>> :for i in range(9999) | let foo = repeat('foo', 9999) | endfor
>>
>> :lua print(x.abc)
>> crash...
>>
>>
>> dict->dv_refcount++ doesn't guard object from garbagecollect.
>
> Many thanks for the report. Now I know what these {l,d}v_copyID were for... :)
> Please check attached patch. There's another change: I had to make the cache
> table a weak-valued table again, otherwise there would be no way that lists
> and dicts would get collected in Lua.
>
> Any feedback is, again, appreciated -- especially bug reports!

It works.  Thank you.

-- 
Yukihiro Nakadaira - [email protected]

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

Raspunde prin e-mail lui