Improvements / Memory leak fix in PythonMatlab::PyMatlabSessionObject_run

Issue #74 resolved
M. Gronle
created an issue
  1. (improvement): check size of given stringarg and chose an appropriate length of command char array, instead of always allocating 3000 characters.
  2. If the function is returned by an exception, command is not freed. Please check in all if-cases if command is != NULL and if so free it there, too.

In order to test this, a computer with installed Matlab is required. Enable Matlab support in CMake of itom (BUILD_WITH_PYMATLAB = True) and set the variable PYMATLAB_INCLUDE_DIR to something like C:/Program Files/MATLAB/R2012a/extern/include.

Hint: Matlab has not to be available on the destination computer, only if one tries to start a session (dynamic function resolve in libmx.dll and libeng.dll)

Comments (2)

  1. Log in to comment