Check out example codes for "c++ delete dynamically allocated array". It will help you in understanding the concepts better.

Code Example 1

int length = 69;
int * numbers = new int[length];
delete[] numbers;

Learn ReactJs, React Native from akashmittal.com