Introduction - If you have any usage issues, please Google them yourself
This code enables you to use the "new" and "delete" keywords in C++ to allocate and deallocate your memory. This enables you to create objects with constructors dynamically.
Normally, using new and delete in MEX files might leak memory if the user presses Ctrl+C or the MEX file terminates with an error. This code modífies "new" and "delete" to register all allocated memory with MATLAB s memory manager.
No modifications to existing C++ code is required.