// Returns true if the reference's pendingNext is null, indicating it is // okay to process this reference. // // If pendingNext is not null, then one of the following cases holds: // 1. The reference has already been enqueued to a java ReferenceQueue. In // this case the referent should not be considered for reference processing // ever again. // 2. The reference is currently part of a list of references that may // shortly be enqueued on a java ReferenceQueue. In this case the reference // should not be processed again until and unless the reference has been // removed from the list after having determined the reference is not ready // to be enqueued on a java ReferenceQueue. bool IsUnprocessed() REQUIRES_SHARED(Locks::mutator_lock_) { return GetPendingNext<kWithoutReadBarrier>() == nullptr;
}
private: // Note: This avoids a read barrier, it should only be used by the GC.
HeapReference<Object>* GetReferentReferenceAddr() REQUIRES_SHARED(Locks::mutator_lock_) { return GetFieldObjectReferenceAddr<kDefaultVerifyFlags>(ReferentOffset());
}
// Field order required by test "ValidateFieldOrderOfJavaCppUnionClasses".
HeapReference<Reference> pending_next_;
HeapReference<Object> queue_;
HeapReference<Reference> queue_next_;
HeapReference<Object> referent_; // Note this is Java volatile:
friendstruct art::ReferenceOffsets; // for verifying offset information friendclass gc::ReferenceProcessor; friendclass gc::ReferenceQueue;
DISALLOW_IMPLICIT_CONSTRUCTORS(Reference);
};
// C++ mirror of java.lang.ref.FinalizerReference class MANAGED FinalizerReference : public Reference { public:
MIRROR_CLASS("Ljava/lang/ref/FinalizerReference;");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.