deconstructor for objects that get destroyed on program exit

I have some classes that are created when the apps starts up.
I need them until the program exits. Do i need a deconstructor for those classes?

no , but if you don’t your program might crash on exit, it’s better to deal with all the dynamically allocated objects by calling delete when it’s appropriate

if this is what you wan’t to release:

vector<ofxDTangibleBase * > _tangibles;

for (int i=0;
delete _tangibles[i];



assuming that ofxDTangibleBase class has a proper ~ofxDTangibleBase() in it;

if you have dynamically allocated things inside that class then delete must be called inside that destructor etc. to deallocate the memory

it was not the tangible but it is the same project :slight_smile:
I like how you connect things :smiley: