|  | v8
    9.0.257(node16.0.0)
    V8 is Google's open source JavaScript engine | 
#include <v8.h>
| Public Member Functions | |
| V8_INLINE | Persistent () | 
| template<class S > | |
| V8_INLINE | Persistent (Isolate *isolate, Local< S > that) | 
| template<class S , class M2 > | |
| V8_INLINE | Persistent (Isolate *isolate, const Persistent< S, M2 > &that) | 
| V8_INLINE | Persistent (const Persistent &that) | 
| template<class S , class M2 > | |
| V8_INLINE | Persistent (const Persistent< S, M2 > &that) | 
| V8_INLINE Persistent & | operator= (const Persistent &that) | 
| template<class S , class M2 > | |
| V8_INLINE Persistent & | operator= (const Persistent< S, M2 > &that) | 
| V8_INLINE | ~Persistent () | 
| template<class S > | |
| V8_INLINE Persistent< S > & | As () const | 
| template<class S , class M2 > | |
| void | Copy (const Persistent< S, M2 > &that) | 
| Static Public Member Functions | |
| template<class S > | |
| static V8_INLINE Persistent< T > & | Cast (const Persistent< S > &that) | 
| Friends | |
| class | Isolate | 
| class | Utils | 
| template<class F > | |
| class | Local | 
| template<class F1 , class F2 > | |
| class | Persistent | 
| template<class F > | |
| class | ReturnValue | 
A PersistentBase which allows copy and assignment.
Copy, assignment and destructor behavior is controlled by the traits class M.
Note: Persistent class hierarchy is subject to future changes.
| 
 | inline | 
A Persistent with no storage cell.
| 
 | inline | 
Construct a Persistent from a Local. When the Local is non-empty, a new storage cell is created pointing to the same object, and no flags are set.
| 
 | inline | 
Construct a Persistent from a Persistent. When the Persistent is non-empty, a new storage cell is created pointing to the same object, and no flags are set.
| 
 | inline | 
The copy constructors and assignment operator create a Persistent exactly as the Persistent constructor, but the Copy function from the traits class is called, allowing the setting of flags based on the copied Persistent.
| 
 | inline | 
| 
 | inline | 
The destructor will dispose the Persistent based on the kResetInDestructor flags in the traits class. Since not calling dispose can result in a memory leak, it is recommended to always set this flag.
| 
 | inline | 
| 
 | inlinestatic | 
| void Copy | ( | const Persistent< S, M2 > & | that | ) | 
| 
 | inline | 
| 
 | inline | 
| 
 | friend | 
Persistent is a way to create a strong pointer from an off-heap object to another on-heap object. As long as the Persistent handle is alive the GC will keep the object pointed to alive. The Persistent handle is always a GC root from the point of view of the GC. Persistent must be constructed and destructed in the same thread.
| 
 | friend |