delete[] problem with release config...
I have a problem with trying to "delete[]" a pointer. I use MSVC++, and I know that we can call without any problem (normally) "delete[]" on a pointer that isn't being allocated to something, example:
Code:
int* a = 0;
delete[] a;
a = new int[100];
Though that worked, until today, when I changed my application's settings to "release", (instead of "debug") so it would get more optimized... But then it doesn't work anymore. Is this possible that "delete[]" on "release" configuration will not check for if the variable was already assigned to something? Is this possible that a "#define" for configuration might check in that delete function what is the configuration? Or am I unlucky?