Skip to content

Commit

Permalink
potential memory leak;
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxies committed Mar 17, 2022
1 parent 0870ef5 commit eea999e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/MibSCutGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,9 +586,13 @@ MibSCutGenerator::intersectionCuts(BcpsConstraintPool &conPool,
CoinZeroN(lowerLevelSol, lCols);
isTimeLimReached = false;
if (!findLowerLevelSol(uselessIneqs, lowerLevelSol, sol, isTimeLimReached)){
delete [] uselessIneqs;
delete [] lowerLevelSol;
goto TERM_INTERSECTIONCUT;
}
if(isTimeLimReached == true){
delete [] uselessIneqs;
delete [] lowerLevelSol;
goto TERM_INTERSECTIONCUT;
}
intersectionFound = getAlphaIC(extRay, uselessIneqs, lowerLevelSol,
Expand Down Expand Up @@ -620,9 +624,13 @@ MibSCutGenerator::intersectionCuts(BcpsConstraintPool &conPool,
isTimeLimReached = false;
if (!findLowerLevelSolWatermelonIC(uselessIneqs, lowerLevelSol, lpSol,
isTimeLimReached)){
delete [] uselessIneqs;
delete [] lowerLevelSol;
goto TERM_INTERSECTIONCUT;
}
if(isTimeLimReached == true){
delete [] uselessIneqs;
delete [] lowerLevelSol;
goto TERM_INTERSECTIONCUT;
}
intersectionFound = getAlphaWatermelonIC(extRay, uselessIneqs, lowerLevelSol,
Expand Down

0 comments on commit eea999e

Please sign in to comment.