Optimization of raw new[]/delete[] vs std::vector
When using a pointer to a dynamically allocated array (directly using new[] and delete[]), the compiler optimized away the calls to operator new and operator delete even though they have observable side effects. This optimization is allowed by the C++ standard section 5.3.4 paragraph 10: An implementation is allowed to omit a call to a … Read more