Hi!
For example, consider the following code snippet
Code:
minnlcstate state;
{
std::vector<double> dataForC = ...;
real_2d_array C;
C.attach_to_ptr(dataForC, nRows, nCols);
real_1d_aray CT = ...;
minnlcsetlc(state, C, CT);
}
// At this point `dataForC` is no longer valid, and with it the pointer to which `C` was attached.
// Is it safe to delete data to which `C` was attached? I.e., does ALGLIB make a copy of object `C` that was passed to `minnlcsetlc`?
minnlcoptimize(state, ...);
Please answer the questions above
minnlcoptimize in the code snippet.