Changeset 19345 for trunk/Mars/mhbase


Ignore:
Timestamp:
11/01/18 20:43:06 (6 years ago)
Author:
tbretz
Message:
Improves the behaviour with RecursiveRemove. Strictly speaking this change might only be necessary if a class contains more than one member which is bound to recursive remove. Onth other hand setting all members to NULL which might be affected by RecursiveRemove is not wrong either.
Location:
trunk/Mars/mhbase
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mhbase/MH3.cc

    r19254 r19345  
    428428{
    429429    if (fHist)
     430    {
    430431        delete fHist;
     432        fHist = 0;
     433    }
    431434
    432435    if (fConversion)
     436    {
    433437        delete fConversion;
     438        fConversion = 0;
     439    }
    434440
    435441    if (fWeight)
     442    {
    436443        delete fWeight;
     444        fWeight = 0;
     445    }
    437446
    438447    for (int i=0; i<4; i++)
    439448        if (fData[i])
     449        {
    440450            delete fData[i];
     451            fData[i] = 0;
     452        }
    441453
    442454    for (int i=0; i<3; i++)
  • trunk/Mars/mhbase/MHn.cc

    r19304 r19345  
    154154    for (int i=0; i<fNum; i++)
    155155        if (fHist[i])
     156        {
    156157            delete fHist[i];
     158            fHist[i] = 0;
     159        }
    157160}
    158161
Note: See TracChangeset for help on using the changeset viewer.