> So it is possible that persistent weak handles built on top of primitive
values did not collected?

Boolean values are eternal --- they never die. Small integers (31 bits on
ia32 and 32bits on x64) are not even allocated in the heap, they are
*values* essentially so weak reachability is undefined for them.

> it is safe return persistent handle via raw return handle; instead of
return handle_scope.Close(handle); ?

Yes. You need to use Close only for Local handles. If you return Persistent
handle you can just return that directly.

--
Vyacheslav Egorov


On Fri, Apr 26, 2013 at 12:42 PM, Dmitry Azaraev <fdd...@gmail.com> wrote:

> Hi.
>
> My question initially originated from CEF V8 integration, described on
> next issues:
> https://code.google.com/p/chromiumembedded/issues/detail?id=323 ,
> https://code.google.com/p/chromiumembedded/issues/detail?id=960 .
>
> In short problem looks as:
> CEF creates persistent and weak handles for every created V8 value (
> Boolean, Integers ). And in this case i found memory leak, when for example
> our native function returns primitive value. For complex values (Object),
> this is did not appear at all.
>
> So it is possible that persistent weak handles built on top of primitive
> values did not collected?
>
> And additional question: it is safe return persistent handle via raw
> return handle; instead of return handle_scope.Close(handle); ?
>
>  --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

--
Vyacheslav Egorov
Software Engineer
Google Danmark ApS - Skt Petri Passage 5, 2 sal - 1165 København K -
CVR nr. 28 86 69 84

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to