#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:
if (!
broker.IsHeapObjectAlive(bar))
bar = nullptr;
}
GCedWithCustomWeakCallback,
&GCedWithCustomWeakCallback::CustomWeakCallbackMethod>(this);
}
};
void RegisterWeakCallbackMethod(const T *object)
Definition at line 44 of file liveness-broker.h.
◆ LivenessBroker()
cppgc::LivenessBroker::LivenessBroker |
( |
| ) |
|
|
privatedefault |
◆ IsHeapObjectAlive() [1/3]
bool cppgc::LivenessBroker::IsHeapObjectAlive |
( |
const T * | object | ) |
const |
|
inline |
◆ IsHeapObjectAlive() [2/3]
bool cppgc::LivenessBroker::IsHeapObjectAlive |
( |
const UntracedMember< T > & | untraced_member | ) |
const |
|
inline |
◆ IsHeapObjectAlive() [3/3]
bool cppgc::LivenessBroker::IsHeapObjectAlive |
( |
const WeakMember< T > & | weak_member | ) |
const |
|
inline |
◆ IsHeapObjectAliveImpl()
bool cppgc::LivenessBroker::IsHeapObjectAliveImpl |
( |
const void * | payload | ) |
const |
|
private |
◆ internal::LivenessBrokerFactory
The documentation for this class was generated from the following files: