#include <liveness-broker.h>
The broker is passed to weak callbacks to allow (temporarily) querying the liveness state of an object. References to non-live objects must be cleared when IsHeapObjectAlive()
returns false.
class GCedWithCustomWeakCallback final
public:
bar = nullptr;
}
GCedWithCustomWeakCallback,
&GCedWithCustomWeakCallback::CustomWeakCallbackMethod>(this);
}
};
Definition: garbage-collected.h:53
Definition: liveness-broker.h:44
bool IsHeapObjectAlive(const T *object) const
Definition: liveness-broker.h:47
void RegisterWeakCallbackMethod(const T *object)
Definition: visitor.h:188
◆ IsHeapObjectAlive() [1/3]
template<typename T >
bool cppgc::LivenessBroker::IsHeapObjectAlive |
( |
const T * |
object | ) |
const |
|
inline |
◆ IsHeapObjectAlive() [2/3]
template<typename T >
bool cppgc::LivenessBroker::IsHeapObjectAlive |
( |
const UntracedMember< T > & |
untraced_member | ) |
const |
|
inline |
◆ IsHeapObjectAlive() [3/3]
template<typename T >
bool cppgc::LivenessBroker::IsHeapObjectAlive |
( |
const WeakMember< T > & |
weak_member | ) |
const |
|
inline |
◆ internal::LivenessBrokerFactory
friend class internal::LivenessBrokerFactory |
|
friend |
The documentation for this class was generated from the following file: