Is there any possible situation where using standard new
/delete
isn't enough and we need to explicitly call a destructor, like pA->~A()
?
I think it's only necessary in some resource management classes, but usually is a bad idea. The destructor is called automatically at the end of scope, so why would I want to explicitly call it myself?
An explanation with an example would be great!