some memory leak 'fixes'

This commit is contained in:
nemu
2009-04-20 14:12:26 +00:00
parent 61f6fd1b9c
commit 99dedce540
8 changed files with 57 additions and 17 deletions

View File

@ -103,6 +103,16 @@ PFitter::~PFitter()
{
fCmdList.clear();
if (fMnUserParamState) {
delete fMnUserParamState;
fMnUserParamState = 0;
}
if (fFcnMin) {
delete fFcnMin;
fFcnMin = 0;
}
if (fFitterFcn) {
delete fFitterFcn;
fFitterFcn = 0;
@ -831,13 +841,17 @@ bool PFitter::ExecuteSave()
hcorr->Draw("COLZTEXT");
else
hcorr->Draw("COLZ");
ccorr->Write();
ccorr->Write("ccorr", TObject::kOverwrite, sizeof(ccorr));
ff.Close();
// clean up
if (ccorr)
if (ccorr) {
delete ccorr;
if (hcorr)
ccorr = 0;
}
if (hcorr) {
delete hcorr;
hcorr = 0;
}
}
parNo.clear(); // clean up
} else {