[Clp] CoinMP cbc memory leak?

Rod Frowd rod at frowd.net
Mon Jun 9 20:33:11 EDT 2008


I have been running the CBC MIP repetitively from CoinMP.dll and it 
seems to be leaking memory and growing in size.

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.

SOLVAPI int CoinUnloadProblem(HPROB hProb)
{
   PCOIN pCoin = (PCOIN)hProb;
   
    if (pCoin) {
        delete pCoin->clp;
        if (pCoin->RowLower) free(pCoin->RowLower);
        if (pCoin->RowUpper) free(pCoin->RowUpper);
        if (pCoin->IsInt) free(pCoin->IsInt);
        delete pCoin->cbc;
        pCoin->cbc = NULL;
    }
    free(pCoin);
    pCoin = NULL;
    return SOLV_SUCCESS;
}


Rod Frowd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rod.vcf
Type: text/x-vcard
Size: 302 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/clp/attachments/20080610/23ebc2fb/attachment.vcf>


More information about the Clp mailing list