I just noticed that the Global copy constructor sets the other Global’s cell to 
NULL. I guess that means moving the global around won’t accidentally increment 
the reference count. That makes sense.

~Theodore

> On Oct 1, 2016, at 7:33 PM, Zac Hansen <[email protected]> wrote:
> 
> You get a new object each time you call new.  Everything else is just bumping 
> the reference count on that object.
> 
> On Sat, Oct 1, 2016 at 7:32 PM, Theodore Dubois <[email protected]> wrote:
> What exactly does that mean? Does that mean this:
> 
> Persistent<String> string(String::NewFromUtf8(isolate, “string”, 
> NewStringType::kNormal).ToLocalChecked());
> Persistent<String string2 = string;
> 
> would result in two different string objects, and using Global instead would 
> result in two handles to the same object?
> 
> ~Theodore
> 
> > On Oct 1, 2016, at 7:29 PM, Zac Hansen <[email protected]> wrote:
> >
> > Ah, UniquePersistent is what is the same as a Global.
> >
> > https://docs.google.com/document/d/1g8JFi8T_oAE_7uAri7Njtig7fKaPDfotU6huOa1alds/edit
> >
> >       • Rename UniquePersistent to Global and give it full move semantics: 
> > CL CL
> >
> > Looks like Persistent is copyable?
> >
> > On Sat, Oct 1, 2016 at 6:55 PM, Theodore Dubois <[email protected]> wrote:
> > Well, Handle is a typedef to Local, but Global is not a typedef to 
> > Persistent. Global and Persistent are different subclasses of 
> > PersistentBase. So there must be some difference between them.
> >
> > ~Theodore
> >
> > > On Oct 1, 2016, at 6:53 PM, Zac Hansen <[email protected]> wrote:
> > >
> > > They are synonyms.   Just like Local and Handle.
> > >
> > > On Saturday, October 1, 2016 at 6:33:33 PM UTC-7, [email protected] wrote:
> > > The documentation comments say Persistent "allows copy and assignment", 
> > > and Global has "move semantics". What exactly does that mean?
> > >
> > > Thanks
> > > ~Theodore
> > >
> > > --
> > > --
> > > v8-users mailing list
> > > [email protected]
> > > http://groups.google.com/group/v8-users
> > > ---
> > > You received this message because you are subscribed to a topic in the 
> > > Google Groups "v8-users" group.
> > > To unsubscribe from this topic, visit 
> > > https://groups.google.com/d/topic/v8-users/uSx4F8Uvwis/unsubscribe.
> > > To unsubscribe from this group and all its topics, send an email to 
> > > [email protected].
> > > For more options, visit https://groups.google.com/d/optout.
> >
> > --
> > --
> > v8-users mailing list
> > [email protected]
> > http://groups.google.com/group/v8-users
> > ---
> > You received this message because you are subscribed to a topic in the 
> > Google Groups "v8-users" group.
> > To unsubscribe from this topic, visit 
> > https://groups.google.com/d/topic/v8-users/uSx4F8Uvwis/unsubscribe.
> > To unsubscribe from this group and all its topics, send an email to 
> > [email protected].
> > For more options, visit https://groups.google.com/d/optout.
> >
> >
> > --
> > --
> > v8-users mailing list
> > [email protected]
> > http://groups.google.com/group/v8-users
> > ---
> > You received this message because you are subscribed to a topic in the 
> > Google Groups "v8-users" group.
> > To unsubscribe from this topic, visit 
> > https://groups.google.com/d/topic/v8-users/uSx4F8Uvwis/unsubscribe.
> > To unsubscribe from this group and all its topics, send an email to 
> > [email protected].
> > For more options, visit https://groups.google.com/d/optout.
> 
> --
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to a topic in the Google 
> Groups "v8-users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/v8-users/uSx4F8Uvwis/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> -- 
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
> --- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "v8-users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/v8-users/uSx4F8Uvwis/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
v8-users mailing list
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to