[CoinMp] CoinMP cbc memory leak?
Rod Frowd
rod at frowd.net
Mon Jun 9 21:19:30 EDT 2008
Stuart:
I have run this on an LP and it does not generate an error.
Deleting a pointer that is NULL is just a noop.
Thanks
Rod
Stuart Mitchell wrote:
> Note your solution will probably cause an error if the user wishes to
> solve a linear (not integer) programing problem.
>
> I think I generated a ticket for this and some other problems I have
> found.
>
> Note I have produced a new version of CoinMP (I have also had to
> change the externals so I compiles properly, and some other bug fixes)
>
> This can be found on the in the svn source code of pulp-or on
> http://code.google.com/p/pulp-or/source/browse
> Rod Frowd wrote:
>> 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
>> _______________________________________________
>> CoinMp mailing list
>> CoinMp at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/coinmp
>>
>
>
-------------- 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/coinmp/attachments/20080610/854a2ba2/attachment.vcf
More information about the CoinMp
mailing list