I know there are a lot of questions about delete and delete but I can't seem to get a straight answer to this.
I create a bunch of objects, lets call them Things:
Thing* thing1 = new Thing();
Thing* thing10 = new Thing();
I then create an array of pointers to these things:
Thing** myArray = new Thing*;
And then copy the pointers across:
myArray = thing1;
myArray = thing10;
Now, if I want to properly clean up "myArray" I assume I call:
But what does this destroy? Is it just the list of pointers or does it destroy all the objects in it too?
i.e. are all the thing1... thing10 pointers still valid after the delete call?