Skip to content

Commit 106c252

Browse files
committed
wip
1 parent 4aeaf39 commit 106c252

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

examples/call_highs_from_c_minimal.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ void minimal_api() {
188188
}
189189
printf("Optimal objective value = %g\n", objective_value);
190190

191+
// Release resources held by the global scheduler.
192+
191193
free(col_value);
192194
free(col_dual);
193195
free(row_value);

highs/interfaces/highs_c_api.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ HighsInt Highs_lpCall(const HighsInt num_col, const HighsInt num_row,
6161
if (copy_row_basis) row_basis_status[i] = (HighsInt)basis.row_status[i];
6262
}
6363
}
64+
65+
highs.resetGlobalScheduler(true);
66+
6467
return (HighsInt)status;
6568
}
6669

@@ -104,6 +107,8 @@ HighsInt Highs_mipCall(const HighsInt num_col, const HighsInt num_row,
104107
}
105108
}
106109

110+
highs.resetGlobalScheduler(true);
111+
107112
return (HighsInt)status;
108113
}
109114

@@ -160,6 +165,9 @@ HighsInt Highs_qpCall(
160165
if (copy_row_basis) row_basis_status[i] = (HighsInt)basis.row_status[i];
161166
}
162167
}
168+
169+
highs.resetGlobalScheduler(true);
170+
163171
return (HighsInt)status;
164172
}
165173

0 commit comments

Comments
 (0)