harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xiao-Feng Li <xiaofeng...@gmail.com>
Subject Re: A question about object move
Date Sat, 18 Apr 2009 12:22:47 GMT
jobject->object is automatically updated by GC after moving the object.

Thanks,
xiaofeng

On Sat, Apr 18, 2009 at 7:13 PM, YixunZhou <seanny2003@gmail.com> wrote:
> Hi all,
>
>      I have a question about question move an object in gc.
>      I see when an jobject is passed to jni, it is created in this way:
>
>     jobject object = oh_allocate_local_handle();
>     object->object = managed_object;
>
>     So I think, when gc moves the managed_object, it must update the
> object->object. But I can't find the code doing this.
>
>     The problem scenario is that I want to trace an object. So far, I use
> the address of the managedobject. But if gc
> moves the object, I lose it. Is there anything I can use in an object for
> this purpose?
>
>   thanks.
>
> --
>
> Best regard,
> Yixun Zhou
> seanny2003@gmail.com
>
>
>



-- 
http://people.apache.org/~xli

Mime
View raw message