In the standard specifications, Section 5.3.5 paragraph 3, regarding the delete
operator:
[...] In the second alternative (delete array) if the dynamic type of the object to be deleted differs from its static type, the behavior is undefined.
So indeed, you should not rely on the gentle behaviour of Visual C++ in this case, and try to provide the array delete
operator a pointer of the correct type, which basically means dynamic casting in your situation.
You may avoid that problem by using a vector instance to store your upcasted objects allocated one by one.