template<typename T>
class cppgc::GarbageCollected< T >
Base class for managed objects. Only descendent types of GarbageCollected
can be constructed using MakeGarbageCollected()
. Must be inherited from as left-most base class.
Types inheriting from GarbageCollected must provide a method of signature void Trace(cppgc::Visitor*) const
that dispatchs all managed pointers to the visitor and delegates to garbage-collected base classes. The method must be virtual if the type is not directly a child of GarbageCollected and marked as final.
public:
}
};
public:
};
class FinalChild final : public NonFinalBase {
public:
NonFinalBase::Trace(visitor);
}
};
GarbageCollected()=default
Definition at line 53 of file garbage-collected.h.