[Coin-discuss] Fix small memory leak in Bcp/LP/BCP_lp.cpp

Simon Barner barner at in.tum.de
Sun May 23 13:18:21 EDT 2004


Hello,

while I tested my BCP application with valgrind
(http://valgrind.kde.org), I found a memory leak, and developed the
following patch:

--- COIN.old/Bcp/LP/BCP_lp.cpp	Sat Oct  4 05:41:33 2003
+++ COIN/Bcp/LP/BCP_lp.cpp	Sun May 23 18:26:09 2004
@@ -98,6 +98,7 @@
    delete local_var_pool;
    delete local_cut_pool;
 
+   delete msg_env;
    // these are vectors of ptrs, but they need not be purged. they just point
    // into the appropriate fields of p.node->vars/cuts
    //    purge_ptr_vector(all_vars);

Perhaps this is not the right solution, but you might get an idea about
where the real cause for the leak is. It is quite possible that similar
leaks exist for the VG and CG modules as well.

Regards,
 Simon Barner

(Please Cc: me in your replies, I am not subscribed to the list)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: Digital signature
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20040523/cac561a1/attachment.sig>


More information about the Coin-discuss mailing list