C function returning an mxArray pointer
Mostrar comentarios más antiguos
Hello!
I am trying to interface our software to Matlab using the functionality to call external, shared libraries from Matlab using loadlibrary and calllib.
My question is:
If I have a C function returning a mxArray pointer: mxArray* myCFunction(mxArray* args);
Will then Matlab be responsible for deleting the object? What If the function returns a null pointer or the input arguments, is this forbidden, e.g.: mxArray* myCFunction(mxArray* args){ return args; }
or
mxArray* myCFunction(mxArray* args){ return 0; }
Best, Joel
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre C Shared Library Integration en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!