Standard shrinkable arrays

Sometimes it is very useful to shrink arrays, which were created using the new[] operator.

We have these reasons to suggest the below improvement: Our suggestion to allow in-place shrinkable arrays in a C++ oriented to objects way is the following: It would be fully oriented to objects, automatically call the destructor and neither move the useful data nor copy it, what would offer great performance.

It should be a C++ standard compatible with most memory allocators.



/* author: ncomputers.org */
int main(){
    int*a=new int[100];
    //Suggested syntax:
    delete[90]a;
    //hereinafter 'a' contains only 10 ints
    delete[]a;
    return 0;
}