Compiler Warning (level 2) C4156
deletion of an array expression without using the array form of 'delete'; array form substituted
The non-array form of delete
cannot delete an array. The compiler translated delete
to the array form.
This warning occurs only under Microsoft extensions (/Ze).
Example
// C4156.cpp
// compile with: /W2
int main()
{
int (*array)[ 10 ] = new int[ 5 ][ 10 ];
delete array; // C4156, changed by compiler to "delete [] array;"
}
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for