I wasn't sure. I've read similar things that say don't ever do anything with a pointer after deletion. So far from testing it all seems good, but I don't want it to blow up on me down the road.
I've read similar things that say don't ever do anything with a pointer after deletion. So far from testing it all seems good, but I don't want it to blow up on me down the road.
You probably misread what those things said - they meant that the object(s) that the pointer was pointing at should not be used/read/messed/written to after thedelete function was called on the pointer - because when you call delete you are basically telling the system to call the destructutors for the objects and reclaim the memory that it so kindly lent us when we called new.
You could treat a pointer on which a "delete" has been applied to practically the same as using an uninitialized pointer. Meaning - it will start throwing problems if you try to use its location without initializing it first (with new, other memory allocation methods or by assigning it to something else). Other than that, no trouble.