Skip to content
Snippets Groups Projects
Commit f89fa721 authored by Sergei Zharko's avatar Sergei Zharko Committed by Sergey Gorbunov
Browse files

QA checker: memory leak fixes

parent c8c95f47
No related branches found
No related tags found
1 merge request!1274Updates in QA task IO and checker
...@@ -160,9 +160,18 @@ void FileHandler::Process(Option_t* opt) ...@@ -160,9 +160,18 @@ void FileHandler::Process(Option_t* opt)
for (int iVer = 0; iVer < nVersions; ++iVer) { for (int iVer = 0; iVer < nVersions; ++iVer) {
if (fpObjDB->GetCmpResult(fDatasetID, fFileID, iObj, iVer)) { areDifferent = true; } if (fpObjDB->GetCmpResult(fDatasetID, fFileID, iObj, iVer)) { areDifferent = true; }
} }
if (areDifferent) { pObjHandler->CreateCanvases(); } if (true || areDifferent) { pObjHandler->CreateCanvases(); }
} }
pObjHandler->Write(); pObjHandler->Write();
// Clean memory
for (auto* pObj: vpObjects) {
if (pObj) {
delete pObj;
pObj = nullptr;
}
}
} // iObj } // iObj
} }
......
...@@ -30,7 +30,15 @@ ObjectHandler::ObjectHandler(int iObject, int iFile, int iDataset, const char* o ...@@ -30,7 +30,15 @@ ObjectHandler::ObjectHandler(int iObject, int iFile, int iDataset, const char* o
// --------------------------------------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------------------------------
// //
ObjectHandler::~ObjectHandler() {} ObjectHandler::~ObjectHandler()
{
for (auto* pObj: fvpObjects) {
if (pObj) {
delete pObj;
pObj = nullptr;
}
}
}
// --------------------------------------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------------------------------
// //
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment