Hi I was just wondering if I create a pointer using the new operator and then I call the new operator on that same pointer later on would that overwrite the existing pointer so that I do not waste memory on the heap or do I have to delete it then use the new operator again.
EG:
ClassA* objA = new ClassA();
.
.
objA = new ClassA();
OR
ClassA* objA = new ClassA();
.
.
delete objA;
objA = new ClassA();
Thank You in advance