Fix memory leak in Matlab mex C++ file.

Job ID: 36739029

Budget: £10 – £20 GBP

I am in need of a developer to fix a memory leak in my Matlab mex C++ file.

I believe that including mxFree() or mxDestroyArray() at the end of evalfive.cpp and evalseven.cpp would resolve this efficiently, but I am not an expert in the C++ side.

Also C++ function is taking an input of double precision, and I could save a lot of memory in the Matlab side if the freelancer could modify the C++ code to use an array of uint8 or uint16 as input (my input from Matlab is an Nx7 array, where N maybe 1e5 or greater).

The C++ file is attached, as well as a matlab .m script where the memory leak becomes very obvious.

Skills for this job:
- Proficiency in Matlab and C++ programming
- Experience in identifying and fixing memory leaks in C++ code
- Ability to work efficiently within a tight deadline