this might be a simple question so accept my appolegises , I am creating a 2 dimetional pointers to int and I want to release the memory at the end but I think I'm doing It all wrong and all of the memory isn't being relaesed.
int **a;
a = new int *[bin->height];
for (int i=0;i<bin->height;i++)
a[i] = new int [bin->width];
for (int i=0;i<bin->height;i++)
delete [] a[i];
delete a;
am I doing it right ?