v8  8.4.371 (node 14.15.5)
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 TraceDescriptor GetTraceDescriptor () const
 
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
 

Static Public Attributes

static constexpr void * kNotFullyConstructedObject = nullptr
 

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 {
public:
void Trace(cppgc::Visitor* visitor) const override {
// Dispatch using visitor->Trace(...);
}
};
virtual void Trace(cppgc::Visitor *) const

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

Member Typedef Documentation

◆ IsGarbageCollectedMixinTypeMarker

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

Member Function Documentation

◆ GetTraceDescriptor()

virtual TraceDescriptor GetTraceDescriptor ( ) const
inlinevirtual

◆ Trace()

virtual void Trace ( cppgc::Visitor ) const
inlinevirtual

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

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

Field Documentation

◆ kNotFullyConstructedObject

constexpr void* kNotFullyConstructedObject = nullptr
staticconstexpr

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

Referenced by GarbageCollectedMixin::GetTraceDescriptor().


The documentation for this class was generated from the following file: