How do I properly... dispose of a vector<>
Members - Reputation: 456
Posted 21 November 2012 - 06:45 PM
however, I am using an API that requires me to use a vector.
So this is what I have in my objects .h file
std::vector<unsigned char> image;
Question is... what do I put in my destructor? Do I need to delete it, dispose it, clear it, take it to dinner and a movie? What?
Crossbones+ - Reputation: 7591
Posted 21 November 2012 - 09:33 PM
You can take it to dinner and a movie, but don't feel you have to. Like most dates, if you just ignore it completely eventually it will go away and leave you to get back to productive programming.
Do I need to delete it, dispose it, clear it, take it to dinner and a movie?
Professional Free Software Developer