[][src]Function ecos::ECOS_cleanup

pub unsafe extern "C" fn ECOS_cleanup(w: *mut pwork, keepvars: idxint)

Cleanup: free memory (not used for embedded solvers, only standalone)

Use the second argument to give the number of variables to NOT free. This is useful if you want to use the result of the optimization without copying over the arrays. One use case is the MEX interface, where we do not want to free x,y,s,z (depending on the number of LHS).