With stack overflow in the topic delete vs delete[:
xxx: If I use delete instead of delete on the array, will this lead to memory leakage?
yyy (best answer): Whether it’s a memory leak, a complete erasure of your hard drive, the demons flying out of your nose, starting to mock you, it doesn’t matter. and unspecified. It can behave this way in one compiler, and differently in another, it can change with the compiler version, with each compilation, depending on the phase of the moon, your mood, or depending on the number of neutrinos flying through the processor in the last sunny day. Or maybe not to change.
All these infinite possibilities are put together in one term: Undefined Behavior.
Just avoid him.