Originally posted by: jlbark
I am calling CPLEX from within a C program using the callable library. Suppose I have solved an LP and I want to add some cuts of my own. I malloc some arrays, populate them, and then call CPXaddrows to add them to the LP. At that point, should I free the arrays that I have malloced? So far I have been assuming that the answer is "yes," and that CPXaddrows will make its own copy of the data that I pass to it, so that I should free the arrays that I malloced in order to prevent memory leaks. However, I am getting some strange errors from CPLEX. I am trying to track down whether it is a bug in my own code or whether my above assumption is incorrect, and that I should *not* free those arrays.
#DecisionOptimization#MathematicalProgramming-General