The next round of changes to Persistent are in. V8_USE_UNSAFE_HANDLES no longer exists. Persistent now has a second template parameter that controls copy and assignment behaviour. The default parameters keep the behaviour unchanged. To allow copying one could use such a class as the below
template<class T> struct CopyablePersistentTraits { typedef Persistent<T, CopyablePersistentTraits<T> > CopyablePersistent; static const bool kResetInDestructor = true; template<class S, class M> static void Copy(const Persistent<S, M>& source, CopyablePersistent* dest) {} }; the Copy function is called on both copy and assign, and the kResetInDestructor variable controls whether Reset is called in the destructor. Setting kResetInDestructor = true is highly recommended, and we plan on changing the default traits class at some point to do this. We will keep the default functionality of disallowing copying and assignment as is, as these are expensive operations. An embedder should only perform them intentionally. -- -- 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.