I have a pointer to a pair, suppose std :: pair <A *, B *> * pointerpair. I allocated its memory, and after using the pair, I call delete pointerpair.
Will it also cause delete A and delete B and completely free the memory?
If I just call delete A and delete B but not delete pointerpair, is that a memory leak?
source
share