Use C++ "new" and "delete" in MATLAB MEX files
by Petter
05 Jun 2009
This code modÃfies "new" and "delete" to register all allocated memory with the memory manager.
|
Watch this File
|
| File Information |
| Description |
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. |
| MATLAB release |
MATLAB 7.5 (R2007b)
|
| Other requirements |
C++ compiler |
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (2) |
| 23 Feb 2011 |
Tim
|
|
|
| 03 Jul 2011 |
Hawren
|
|
|
|
Contact us at files@mathworks.com