Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v80-bugfix'
Browse files Browse the repository at this point in the history
  • Loading branch information
scip-ci committed Aug 5, 2023
2 parents 1dde0f4 + 31078e5 commit 632a310
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ Fixed bugs
- ensure that delayed cutpool separation does not happen if enough cuts have been found already
- fixed that a Gurobi or Mosek interface (LPI) could not be freed from a thread different than the one it was created in, which lead to problems when, e.g., using the concurrent optimizer
- in cons_varbound if both variables are fixed, instead of propagating the constraint check the feasibility of the constraint since propagating can lead to unnecessary numerical troubles
- fixed memory leak in branching rule "distribution"

@section RN804 SCIP 8.0.4
*************************
Expand Down
14 changes: 10 additions & 4 deletions src/scip/branch_distribution.c
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,12 @@ void branchruledataFreeArrays(
SCIPfreeBlockMemoryArray(scip, &branchruledata->rowinfinitiesup, branchruledata->memsize);
SCIPfreeBlockMemoryArray(scip, &branchruledata->rowinfinitiesdown, branchruledata->memsize);

SCIPfreeBlockMemoryArray(scip, &branchruledata->varfilterposs, branchruledata->varpossmemsize);
SCIPfreeBlockMemoryArray(scip, &branchruledata->varposs, branchruledata->varpossmemsize);
SCIPfreeBlockMemoryArray(scip, &branchruledata->updatedvars, branchruledata->varpossmemsize);
SCIPfreeBlockMemoryArray(scip, &branchruledata->currentubs, branchruledata->varpossmemsize);
SCIPfreeBlockMemoryArray(scip, &branchruledata->currentlbs, branchruledata->varpossmemsize);

branchruledata->memsize = 0;
}
}
Expand Down Expand Up @@ -1070,9 +1076,6 @@ SCIP_DECL_BRANCHEXITSOL(branchExitsolDistribution)
branchruledata = SCIPbranchruleGetData(branchrule);
assert(branchruledata != NULL);

/* free row arrays when branch-and-bound data is freed */
branchruledataFreeArrays(scip, branchruledata);

/* drop variable events at the end of branch and bound process (cannot be used after restarts, anyway) */
if( branchruledata->varfilterposs != NULL)
{
Expand All @@ -1088,8 +1091,11 @@ SCIP_DECL_BRANCHEXITSOL(branchExitsolDistribution)
{
SCIP_CALL( SCIPdropVarEvent(scip, vars[v], EVENT_DISTRIBUTION, branchruledata->eventhdlr, NULL, branchruledata->varfilterposs[v]) );
}
SCIPfreeBlockMemoryArray(scip, &(branchruledata->varfilterposs), nvars);
}

/* free row arrays when branch-and-bound data is freed */
branchruledataFreeArrays(scip, branchruledata);

return SCIP_OKAY;
}

Expand Down

0 comments on commit 632a310

Please sign in to comment.