Hi Xiang I've had a look through that thread before. I'll try SetResourceConstraints(), but that seems like a hack to me, especially since I can't change it after the VM has been initialised. What I really need is a way to destroy all weak references when I've disposed the context.
On Mon, Nov 30, 2009 at 6:39 PM, Xiang <[email protected]> wrote: > Hi, Abdulla, > > > To make sure your weak handle callback is called, you have to create > lots of objects. As GC will only clean necessary space based on its > heuristic rules, not all garbages. > > You can use API SetResourceConstraints() to constraint the heap > resource . It will make it easier to trigger GC(there is a test case > in cctest). > > There is a also sample about weak handle callback in > > http://groups.google.com/group/v8-users/browse_thread/thread/9effc94911772167/f4806a7e28d6c9f7?lnk=gst&q=Jacob#f4806a7e28d6c9f7 > > You will find it useful. > > > Cheers~ > Xiang > > > > > On Nov 30, 2:16 pm, Abdulla Kamar <[email protected]> wrote: > > Hi Xiang > > > > I've tried that, but it still doesn't destroy the weak references. > > > > > > > > > > > > On Mon, Nov 30, 2009 at 3:49 PM, Xiang <[email protected]> wrote: > > > Hi, Abdulla, > > > > > GC will be triggered when a new context is created(You can find it > > > when you try to trace Context::New()). > > > > > It used some heuristic method for better performance. > > > > > Cheers~ > > > Xiang > > > > > On Nov 30, 7:45 am, Abdulla <[email protected]> wrote: > > > > According to the ChangeLog for version 1.0.3, garbage collection is > > > > forced when disposing contexts, but I can't seem to trigger it in > > > > order to destroy weak references. Am I doing something wrong? > > > > > -- > > > v8-users mailing list > > > [email protected] > > >http://groups.google.com/group/v8-users > > > > -- > > Thank you > > Abdulla > > -- > v8-users mailing list > [email protected] > http://groups.google.com/group/v8-users > -- Thank you Abdulla -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
