I am trying to understand when i need to use "delete".
I want to understand if i have dynamic declaration for object called X inside the class(named mycass) and then also i have dynamic deceleration in main for
myclass* first= new myclass();
From what i understand there is a need to free the memory after i finish using those class.
So i need to call delete in my main that free the object called first wright?and then it will go inside the class and will run destractorthat i am supposse to implement.am i wright?