[Clp] C interface asks user to call delete[]

Stefan Vigerske stefan at math.hu-berlin.de
Tue Dec 18 04:03:32 EST 2012


Hi,

yes, a patch would be best.

Stefan

On 12/18/2012 07:14 AM, Miles Lubin wrote:
> Hi all,
>
> Some of you may be interested to know that Carlo Baldassi and I are working
> on a Clp interface for the new language Julia (http://julialang.org/).
> Julia is currently capable of calling only C-based APIs, so we are using
> Clp_C_Interface.h, which has been working well so far. One small snag is
> with Clp_infeasibilityRay and Clp_unboundedRay, which return pointers which
> the user is expected to free by calling delete[]. We don't have the ability
> to do this from Julia. While there are hackish workarounds, this really
> seems like an issue with the interface, since a user in C shouldn't be
> expected to call C++'s delete.
>
> Looking at Clp_C_Interface.cpp and ClpModel.cpp, it looks like a quick fix
> to move some logic into Clp_C_Interface.cpp so that the arrays can be
> allocated with malloc(). I'm happy to make a patch if that would be the
> easiest course of action.
>
> Thanks,
> Miles
>
>
>
> _______________________________________________
> Clp mailing list
> Clp at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/clp
>



More information about the Clp mailing list