Removing the use of 'new' for creating a simple array. std::vector is better to use in this instance.