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.
- Improve the delete operator syntax by this way:
delete [objects to delete] pointer to array;
where delete is equivalent to delete nothing.
It should be a C++ standard compatible with most memory allocators.