I am trying to understand how to delete objects added to the THStack class and noticed two statements which seem rather contradictory. In the ROOT user manual July 2006 V5.12, page 41 (as marked) there is the following text…
A THStack is a collection of TH1 (or derived) objects. Use THStack::Add(TH1 *h) to add a histogram to the stack. The THStack owns the objects in the list
while the online html documentation (root.cern.ch/root/html/THStack#T … escription) states…
A THStack is a collection of TH1 (or derived) objects
Use THStack::Add to add a new histogram to the list.
The THStack does not own the objects in the list.