If I create an instance of a class, and then delete it, I assume that the non-dynamic variables are all cleaned up automatically. The destructor is supposed to be used for dynamically allocated variables, right?
If I use dynamic pointer to create a class, I am assuming that the non-dynamic variables within the class will still be destroyed implicitly, correct? If a dynamic value is assigned within a class, and not handled by the destructor, that would, if I'm not mistaken, create a leak would it not?
I am just trying to check my understanding to make sure I was up to speed. Pls tell me if I am mistaken about anything.