[Coin-discuss] Possible Memory Leak in OsiGlpk
Joseph Young
josyoun at nmt.edu
Fri Jun 17 14:42:54 EDT 2005
Hi,
On line 1683:
int *columnIndicesPlus1 = new int[num+1];
columnIndicesPlus1 is declared as a pointer with memory allocated to it.
However, this memory is never deallocated with the delete operator.
This also occurs on lines
1787 with rowIndicesPlus1
1965 with index_adj
1966 with value_adj
In older versions of COIN, this wasn't an issue because these
arrays were declared using variable size array bounds. This was not ISO
C++ compatible, so the code was changed to allocate memory dynamically.
It looks like the deallocation was just missed.
Sinc, Joseph Young
More information about the Coin-discuss
mailing list