217 TList removeDirectory;
227 auto obj = tlk->GetObject();
229 tlk->SetObject(
nullptr);
231 Error(
"Delete",
"A list is accessing an object (%p) already deleted (list name = %s)",
233 else if (obj && obj->IsOnHeap())
235 else if (obj && obj->IsA()->GetDirectoryAutoAdd())
236 removeDirectory.
Add(obj);
249 TIter iRemDir(&removeDirectory);
251 while ((dirRem = iRemDir())) {
351 next = lnk->NextSP();
352 TObject *ob = lnk->GetObject();
393 if (!lnk)
return nullptr;
#define R__COLLECTION_READ_LOCKGUARD(mutex)
#define R__COLLECTION_WRITE_LOCKGUARD(mutex)
ROOT::DirAutoAdd_t GetDirectoryAutoAdd() const
Return the wrapper around the directory auto add function.
virtual bool UseRWLock(Bool_t enable=true)
Set this collection to use a RW lock upon access, making it thread safe.
const char * GetName() const override
Return name of this collection.
static void GarbageCollect(TObject *obj)
Add to the list of things to be cleaned up.
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
void Delete(Option_t *option="") override
Remove all objects from the list AND delete all heap based objects.
void AddBefore(const TObject *before, TObject *obj) override
Insert object before object before in the list.
void Clear(Option_t *option="") override
Remove all objects from the list.
void AddFirst(TObject *obj) override
Add object at the beginning of the list.
void Rehash(Int_t newCapacity)
Rehash the hashlist.
virtual ~THashList()
Delete a hashlist.
void AddAfter(const TObject *after, TObject *obj) override
Insert object after object after in the list.
void RecursiveRemove(TObject *obj) override
Remove object from this collection and recursively remove the object from all other objects (and coll...
void AddAt(TObject *obj, Int_t idx) override
Insert object at location idx in the list.
THashList(const THashList &)=delete
const TList * GetListForObject(const char *name) const
Return the THashTable's list (bucket) in which obj can be found based on its hash; see THashTable::Ge...
bool UseRWLock(Bool_t enable=true) override
Set this collection to use a RW lock upon access, making it thread safe.
Float_t AverageCollisions() const
Return the average collision rate.
TObject * Remove(TObject *obj) override
Remove object from the list.
TObject * FindObject(const char *name) const override
Find object using its name.
void AddLast(TObject *obj) override
Add object at the end of the list.
THashTable implements a hash table to store TObject's.
Float_t AverageCollisions() const
void Add(TObject *obj) override
Add object to the hash table.
const TList * GetListForObject(const char *name) const
Return the TList corresponding to object's name based hash value.
TObject * Remove(TObject *obj) override
Remove object from the hashtable.
void Rehash(Int_t newCapacity, Bool_t checkObjValidity=kTRUE)
Rehash the hashtable.
TObject * RemoveSlow(TObject *obj)
Remove object from the hashtable without using the hash value.
void AddBefore(const TObject *before, TObject *obj)
Add object to the hash table.
TObject * FindObject(const char *name) const override
Find object using its name.
void Clear(Option_t *option="") override
Remove all objects from the table.
void AddAfter(const TObject *after, TObject *obj) override
Insert object after object after in the list.
void Clear(Option_t *option="") override
Remove all objects from the list.
void AddAt(TObject *obj, Int_t idx) override
Insert object at position idx in the list.
void Add(TObject *obj) override
TObject * Remove(TObject *obj) override
Remove object from the list.
void AddLast(TObject *obj) override
Add object at the end of the list.
TObjLinkPtr_t fLast
pointer to first entry in linked list
void AddBefore(const TObject *before, TObject *obj) override
Insert object before object before in the list.
void Delete(Option_t *option="") override
Remove all objects from the list AND delete all heap based objects.
TObjLinkWeakPtr_t fCache
pointer to last entry in linked list
void AddFirst(TObject *obj) override
Add object at the beginning of the list.
Wrapper around a TObject so it can be stored in a TList.
TObject * GetObject() const
Mother of all ROOT objects.
Bool_t HasInconsistentHash() const
Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveR...
virtual void RecursiveRemove(TObject *obj)
Recursively remove this object from a list.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual TClass * IsA() const
R__ALWAYS_INLINE bool HasBeenDeleted(const TObject *obj)
Check if the TObject's memory has been deleted.
R__EXTERN TVirtualRWMutex * gCoreMutex