diff options
author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2012-08-07 03:16:28 -0400 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2013-02-12 06:49:40 -0500 |
commit | 95cf0a86519981386d22604bab27502fa096df50 (patch) | |
tree | af01fbe8c598436640e5716df956f0f0d429940a | |
parent | af42638c4bcf81d3d34c147b9217ddb2f6833cfd (diff) |
Add memory leak debug code to testmain
The CPLEX integration likes to leak memory. This loop makes it very
obvious.
-rw-r--r-- | native/src/testmain.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
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) | |||
974 | 974 | ||
975 | delete results; | 975 | delete results; |
976 | 976 | ||
977 | bool check_for_memory_leaks = false; | ||
978 | |||
979 | // Run the LP code in a loop to see if memory footprint increases | ||
980 | // significantly. | ||
981 | while (check_for_memory_leaks) { | ||
982 | results = lp_dflp_bounds(rsi, loc); | ||
983 | delete results; | ||
984 | results = lp_dpcp_bounds(rsi, loc); | ||
985 | delete results; | ||
986 | } | ||
987 | |||
977 | #endif | 988 | #endif |
978 | 989 | ||
979 | return 0; | 990 | return 0; |