Can anyone point me to where I can learn how to properly clean memory allocated if I have something like this:
Code:class Mainview : public GameState { public: private: std::vector<GameObject*> m_gameObjects; };
initiated like this:
I hope I made myself clear enough...Code:GameObject* button1 = new Button(new LoaderParams(840, 455, 140, 40, 140, 40, "monument-B"), s_mainToMonument); m_gameObjects.push_back(button1);
Thanks!