I\'m trying to wrap a C++ class in a matlab mex wrapper using the approach outlined here. Basically, I have an initialization mex file which returns a C++ object handle:
When you pass an object instance into the body of a PARFOR
loop, the behaviour is the same as if you'd saved it to a file, and then loaded it again. The simplest solution is probably to mark your cpp_handle_
as Transient
. Then, you need to implement SAVEOBJ
and LOADOBJ
to safely transport your data. See this page for more about customising the save/load behaviour of your class.