8 #ifndef CAN_NEW_ARRAY_H
9 #define CAN_NEW_ARRAY_H
41 delete [] this->elems;
bool allocated() const
return true if memory has been allocated
~NewArray()
Array destructor frees memory.
void allocate(std::size_t n)
user-callable allocation helper
wrapper over operator new/delete []
compile-time (static) array of size N
void deallocate()
user-callable deallocation helper
void resize(unsigned n)
resize the array
NewArray()
default initialize pointer to zero
NewArray(std::size_t n)
construct with (n) elements