Hi,
> i've created hundreds of PathFinder objects in small scopes to try to
> force GC, but my debugging message in pf_dtor() never gets output:
How many of these objects have you created, exactly? I've had to
create thousands before it would clear.
You might want to try, to test it:
for( var i = 0; i < 50000; ++i )
{
var p = ['/usr/bin','/bin','~/bin'];
my.p = new PathFinder(p.join(''+i),"",""+i);
//delete my.p;
}
I'm still looking over the code to see if I can find anything wrong
with it, but there isn't anything glaring,
Alex
On Mar 5, 2009, at 1:36 PM, Stephan Beal wrote:
> Hi, all!
>
> After having bound hundreds of C-like functions i'm ready to bind my
> first class in v8. i've got it working so far except that my Weak
> Pointer callback isn't being triggered, and i have been unable to
> figure out why. i'm pasting the code here - it's a bit long, but i
> would really appreciate any insights on this, as i can't do ANY class-
> level wrapping until i figure out how to get the objects deleted
> properly.
>
> Most of the code below was based on suggestions from:
> http://create.tpsitulsa.com/blog/2009/01/31/persistent-handles/
> http://create.tpsitulsa.com/blog/2009/01/29/v8-objects/
>
> It's worth noting that the v8 sample code doesn't have any examples of
> weak pointers :(.
>
> The class i'm wrapping, PathFinder, can be considered opaque for our
> purposes - the binding to the object appears to work, it's just that
> my dtor (pf_dtor()) is never called.
Alex Iskander, TPSi
--~--~---------~--~----~------------~-------~--~----~
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
-~----------~----~----~----~------~----~------~--~---