[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
v8

Module cppgc

Source

Structs§

  • A heap for allocating managed C++ objects.
  • Members are used in classes to contain strong pointers to other garbage collected objects. All Member fields of a class must be traced in the class’ trace method.
  • 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.
  • Ptr is used to refer to an on-heap object from the stack.
  • Visitor passed to trace methods. All managed pointers must have called the Visitor’s trace method on them.
  • WeakMember is similar to Member in that it is used to point to other garbage collected objects. However instead of creating a strong pointer to the object, the WeakMember creates a weak pointer, which does not keep the pointee alive. Hence if all pointers to to a heap allocated object are weak the object will be garbage collected. At the time of GC the weak pointers will automatically be set to null.
  • WeakPersistent is a way to create a weak pointer from an off-heap object to an on-heap object. The pointer is automatically cleared when the pointee gets collected. WeakPersistent must be constructed and destructed in the same thread.

Enums§

Traits§

Functions§

Type Aliases§