I have a question about how to clean up certain thing, or if it's even necessary at all. Say I have a vector of objects. These objects have members that are pointers. When I remove one of these objects from the vector will everything be cleaned up automatically? Or do I have to do something?
michdd
0
Newbie Poster
Recommended Answers
Jump to PostThe class destructor is responsible for deallocating memory for those pointers, assuming the memory was allocated using new or malloc().
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.