Ignore:
Timestamp:
04/19/10 13:11:19 (15 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MStatusArray.cc

    r9569 r9571  
    4949#include <TCanvas.h>
    5050
     51#include <TGraph.h>           // For the TGraph workaround
     52#include <TPaveText.h>        // For the TPaveText workaround
     53
    5154#include "MLog.h"
    5255#include "MLogManip.h"
     
    5659
    5760ClassImp(MStatusArray);
    58 
    59 #include <TGraph.h>
    6061
    6162using namespace std;
     
    7778// name) recuresively
    7879//
    79 #include<TPaveText.h>
    8080void MStatusArray::RecursiveDelete(TVirtualPad *p, const char id) const
    8181{
     
    9898                continue;
    9999
     100            /*
     101            // This is necessary because the histogram can get deleted
     102            // but is not treated in TGraph recursive remove. Unfortunately,
     103            // we have no possibility to find out whether it was already
     104            // deleted. Fortunately these histograms don't contain data
     105            // and threfore don't consume memory.
     106            TGraph *g = dynamic_cast<TGraph*>(o);
     107            if (g)
     108                g->SetHistogram(0);
     109             */
     110
    100111            delete o;
    101112
     
    153164        if (dynamic_cast<TGraph*>(o))
    154165        {
     166            // FIXME: This should not be called for the TGraph
     167            // which is currently getting deleted.
    155168            TGraph *g = static_cast<TGraph*>(o);
    156169            if (g->GetHistogram()==obj)
    157170                g->SetHistogram(0);
     171            else
     172                g->GetHistogram()->SetBit(kMustCleanup);
    158173
    159174            continue;
     
    175190    TObjArray::RecursiveRemove(obj);
    176191
     192    // FIXME: Maybe we still have to call SetBit(kMustCleanup) ???
     193#if ROOT_VERSION_CODE <= ROOT_VERSION(5,26,00)
    177194    TObject *o = 0;
    178195
     
    180197    while ((o=Next()))
    181198        RecursiveRemove(dynamic_cast<TVirtualPad*>(o), obj);
     199#endif
    182200}
    183201
Note: See TracChangeset for help on using the changeset viewer.