v8  9.0.257(node16.0.0)
V8 is Google's open source JavaScript engine
GarbageCollectedMixin Class Reference

#include <garbage-collected.h>

Inheritance diagram for GarbageCollectedMixin:
Collaboration diagram for GarbageCollectedMixin:

Public Types

using IsGarbageCollectedMixinTypeMarker = void

Public Member Functions

virtual void Trace (cppgc::Visitor *) const
- Public Member Functions inherited from GarbageCollectedBase
void * operator new (size_t)=delete
void * operator new[] (size_t)=delete
void operator delete (void *)
void operator delete[] (void *)=delete

Additional Inherited Members

- Protected Member Functions inherited from GarbageCollectedBase
 GarbageCollectedBase ()=default

Detailed Description

Base class for managed mixin objects. Such objects cannot be constructed directly but must be mixed into the inheritance hierarchy of a GarbageCollected object.

Types inheriting from GarbageCollectedMixin must override a virtual method of signature void Trace(cppgc::Visitor*) const that dispatchs all managed pointers to the visitor and delegates to base classes.

class Mixin : public GarbageCollectedMixin {
void Trace(cppgc::Visitor* visitor) const override {
// Dispatch using visitor->Trace(...);

Definition at line 103 of file garbage-collected.h.

Member Typedef Documentation

◆ IsGarbageCollectedMixinTypeMarker

Definition at line 105 of file garbage-collected.h.

Member Function Documentation

◆ Trace()

virtual void Trace ( cppgc::Visitor ) const

This Trace method must be overriden by objects inheriting from GarbageCollectedMixin.

Definition at line 111 of file garbage-collected.h.

The documentation for this class was generated from the following file:
virtual void Trace(cppgc::Visitor *) const
Definition: garbage-collected.h:111
Definition: visitor.h:52