Ensure consistent use of new and delete on C++ arrays