From 95cf0a86519981386d22604bab27502fa096df50 Mon Sep 17 00:00:00 2001 From: Bjoern Brandenburg Date: Tue, 7 Aug 2012 09:16:28 +0200 Subject: Add memory leak debug code to testmain The CPLEX integration likes to leak memory. This loop makes it very obvious. --- native/src/testmain.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'native/src/testmain.cpp') diff --git a/native/src/testmain.cpp b/native/src/testmain.cpp index 01af973..9605cd0 100644 --- a/native/src/testmain.cpp +++ b/native/src/testmain.cpp @@ -974,6 +974,17 @@ int main(int argc, char** argv) delete results; + bool check_for_memory_leaks = false; + + // Run the LP code in a loop to see if memory footprint increases + // significantly. + while (check_for_memory_leaks) { + results = lp_dflp_bounds(rsi, loc); + delete results; + results = lp_dpcp_bounds(rsi, loc); + delete results; + } + #endif return 0; -- cgit v1.2.2