I have always used ... unsigned char* when needing to read in bytes...
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?
Thanks.
How do I properly... dispose of a vector<>
Do I need to delete it, dispose it, clear it, take it to dinner and a movie?
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement