snopt / snopt-matlab

Matlab interface for sparse nonlinear optimizer SNOPT
MIT License
55 stars 23 forks source link

Matlab mex updates #6

Closed gnowzil closed 7 years ago

gnowzil commented 7 years ago

Address issue #3.

Updated mexErrMsgTxt to mexErrMsgIdAndTxt.

Moved all allocatable arrays to module mxsnWork. This allows the use of subroutine resetSNOPT that can check and deallocate all allocatable arrays, which can be registered with mexAtExit. Hopefully this prevents matlab crashes when unexpected errors occur.