<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Ming:<br>
<br>
I posted this several years ago:<br>
<br>
"I have been running the CBC MIP repetitively from CoinMP.dll and it
seems to be leaking memory and growing in size.
<br>
<br>
I have added a delete of the cbc object into CoinMP.cpp as follows. It
looks like this will also delete the cut generator objects created as
its destructor includes deletion of the cut generators.
<br>
<br>
SOLVAPI int CoinUnloadProblem(HPROB hProb)
<br>
{
<br>
PCOIN pCoin = (PCOIN)hProb;
<br>
if (pCoin) {
<br>
delete pCoin->clp;
<br>
if (pCoin->RowLower) free(pCoin->RowLower);
<br>
if (pCoin->RowUpper) free(pCoin->RowUpper);
<br>
if (pCoin->IsInt) free(pCoin->IsInt);
<br>
delete pCoin->cbc;
<br>
pCoin->cbc = NULL;
<br>
}
<br>
free(pCoin);
<br>
pCoin = NULL;
<br>
return SOLV_SUCCESS;
<br>
}
<br>
<br>
"<br>
<br>
And I think Stuart Mitchell from NZ also raised a ticket about this.<br>
<br>
Rod<br>
<br>
ming lu wrote:
<blockquote
cite="mid:444a4cee0910130759j7c1cd226he370aedb73269c12@mail.gmail.com"
type="cite">
<blockquote type="cite">
<pre wrap="">Hi All,
It looks that CoinUnloadProblem doesn't release resource correctly.
The cbc was not released, this causes a huge memory leak problem. Also
following members are not explicitly released:
ClpSolve *clp_presolve;
OsiClpSolverInterface *osi;
CBMessageHandler *msghandler;
CBIterHandler *iterhandler;
CBNodeHandler *nodehandler;
CglProbing *probing;
CglGomory *gomory;
CglKnapsackCover *knapsack;
CglOddHole *oddhole;
CglClique *clique;
CglLiftAndProject *liftpro;
CglSimpleRounding *rounding;
Could someone take a look?
Thanks,
Ming
</pre>
</blockquote>
<pre wrap=""><!---->
_______________________________________________
CoinMp mailing list
<a class="moz-txt-link-abbreviated" href="mailto:CoinMp@list.coin-or.org">CoinMp@list.coin-or.org</a>
<a class="moz-txt-link-freetext" href="http://list.coin-or.org/mailman/listinfo/coinmp">http://list.coin-or.org/mailman/listinfo/coinmp</a>
</pre>
</blockquote>
</body>
</html>