@p1r4t3b0y wrote:
Hi,
If I instantiate class objects inside ofApp.cpp, using the
new
operator - which allocates them in heap memory - , where do I need to delete them, if they remain valid until the application is closed?Is there for instance something like an
ofApp::exit()
method that executes code right before quitting the application?
Or should I declare and define a destructor for theofApp
class, and if so, does it take care of the cleanup at the end, if I putdelete myObject
inside its definition?I’m pretty new to C++! Any help is appreciated.
Thanks.
Posts: 1
Participants: 1