Ignore:
Timestamp:
05/01/12 12:15:02 (13 years ago)
Author:
Jens Buss
Message:
modified the destructor for array usage
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/rootmacros/PulseTemplates/pixel.C

    r13473 r13487  
    7171{
    7272    if (mVerbosityLevel > 2) cout << endl << "...delete current pixel histograms" ;
    73 //    for (int order = 0;
    74 //         order < mMaxPulseOrder;
    75 //         order ++)
    76 //    {
     73
     74    for (int order = 0;
     75         order < mMaxPulseOrder;
     76         order ++)
     77    {
    7778        if (mVerbosityLevel > 3) cout << endl << "...deleting hMaxOverlay";
    78         delete[] hMaxOverlay;
    79         hMaxOverlay = NULL;
     79        delete hMaxOverlay[order];
     80
    8081        if (mVerbosityLevel > 3) cout << endl << "...deleting hEdgeOverlay";
    81         delete[] hEdgeOverlay;
    82         hEdgeOverlay = NULL;
     82        delete hEdgeOverlay[order];
     83
    8384        if (mVerbosityLevel > 3) cout << endl << "...deleting hMaxProfile";
    84         delete[] hMaxProfile;
    85         hMaxProfile = NULL;
     85        delete hMaxProfile[order];
     86
    8687        if (mVerbosityLevel > 3) cout << endl << "...deleting hMaxProfile2";
    87         delete[] hEdgeProfile;
    88         hEdgeProfile = NULL;
    89 //    }
     88        delete hEdgeProfile[order];
     89    }
     90    if (mVerbosityLevel > 3) cout << endl << "...deleting histogram Arrays";
     91    delete[] hMaxOverlay;
     92    hMaxOverlay = NULL;
     93
     94    delete[] hEdgeOverlay;
     95    hEdgeOverlay = NULL;
     96
     97    delete[] hMaxProfile;
     98    hMaxProfile = NULL;
     99
     100    delete[] hEdgeProfile;
     101    hEdgeProfile = NULL;
     102
    90103    if (mVerbosityLevel > 3) cout << endl << "...deleting hList";
    91104    delete hList;
Note: See TracChangeset for help on using the changeset viewer.