Why it has error in releasing the static array in debug mode?
int main()
{
int ar[] = { 1,2,3,4,5,6,7,8,9 };
//other code
delete(ar);
// or free(ar);
return 0;
}
I used free
or delete
to release the array and it finished with error in debug mode
.
Do i use the free
or delete
correctly?
How can i release the array?