Ignore:
Timestamp:
06/23/03 13:19:34 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r2178 r2210  
    7575    fContainer  = new TOrdCollection;
    7676    fAutodelete = new TOrdCollection;
     77
     78    gROOT->GetListOfCleanups()->Add(fContainer);
     79    gROOT->GetListOfCleanups()->Add(fAutodelete);
     80    fContainer->SetBit(kMustCleanup);
     81    fAutodelete->SetBit(kMustCleanup);
    7782}
    7883
     
    111116    IsOwner() ? fContainer->SetOwner() : fAutodelete->SetOwner();
    112117
     118    TIter Next(fContainer);
     119    TObject *o;
     120    while (o=Next())
     121        if (o->TestBit(kCanDelete))
     122            delete fContainer->Remove(o);
     123
    113124    // FIXME? If fContainer is owner do we have to remove the object
    114125    //   from fAutodelete due to the acces when checking for a
     
    206217    *fLog << inf << "Adding " << name << " to " << GetName() << "... " << flush;
    207218
     219    cont->SetBit(kMustCleanup);
    208220    fContainer->Add(cont);
    209221    *fLog << "Done." << endl;
     
    228240    MParContainer *cont = NULL;
    229241    while ((cont=Next()))
     242    {
     243        cont->SetBit(kMustCleanup);
    230244        AddToList(cont);
     245    }
    231246}
    232247
Note: See TracChangeset for help on using the changeset viewer.