Skip to content
Snippets Groups Projects
user avatar
Philippe Canal authored
On some platform operator delete taints the memory, so even right after the deletion the information
stored by ~TObject is already erased.  On those platform we no longer rely on the kNotDelete bit hack
and rely on the system (which has tainted the memory assumingly for a reason) to detect the
use-after-delete problems.

Introduce 2 new functions.

TObject::IsDestructed (used by TClonesArray) that detects that the destructor has been run and is
active in all configuration.  This should be used if the code knows that the memory has not been
freed/deleted.

ROOT::Detail::HasBeenDeleted(TObject*) with returns true if the platform does not taint the memory
and if the kNotDeleted is not set (in all other case, it returns false)

This fixes #11330
94a44fe9
History