The same is also true for something as simple as
int *p_scalar = new int(5);
Many thanks in advance
I struggled with this same problem for a while, and was confused at why the MQX C++ example project worked, but C++ code in my own project did not work. After consulting IAR support, it turns out that the solution is to re-direct the new() and delete() operators via the Linker Options in your project settings. Under Project>Options>Linker>Extra Options, check the "Use command line options" box, and add the folloiwing into the "Command Line Options" text box:
This causes IAR redirects new() to __iar_dlmalloc(), and this linker option then redirects __iar_dlmalloc() to malloc(), which is redirected to the MQX _mem_alloc(). This seems like a roundabout way of doing it, but this is actually how Freescale accomplishes it in their C++ example project - take a look at the project settings and you'll find this in there.
Hope this helps!