The library ooqpwas put in place at my workplace. At the moment, the student is completing it, and I wonder how best to deal with it. The following is an example of the function used by the program:
newQpGenSparse( double ** c, int nx,
int ** irowQ, int nnzQ, int ** jcolQ, double ** dQ,
double ** xlow, char ** ixlow,
double ** xupp, char ** ixupp,
int ** irowA, int nnzA, int ** jcolA, double ** dA,
double ** b, int my,
int ** irowC, int nnzC, int ** jcolC, double ** dC,
double ** clow, int mz, char ** iclow,
double ** cupp, char ** icupp,
int * ierr );
http://pages.cs.wisc.edu/~swright/ooqp/ooqp-userguide.pdf
Correctly? The library is written in c++, so I'm looking for a way to rationally manage memory.
The use of conjugated links is necessary when interacting with these functions, but I was hoping that perhaps the best way to do this is to use std::shared_ptrand then expose the raw memory for these functions. This has an obvious drawback that usage shared_ptrwill be impaired, especially if the memory is deleted or edited by functions ooqp.
Is there a better way to handle this other and then just be careful with the new one and delete it?