Sunday, 11 August 2013

Class Vector memory leak

Class Vector memory leak

I have a class within this class i have a vector
I make a "new" object of this class and re-size the vector;
later on i delete the class and I get memory leaks. Why is this? I figure
it has to do with me resizing this vector thats inside my "new" class
drawn out
class A
{
std::vector<>
};
A myObj = new A();
myObj.vector.resize( what ever number );
delete myObj;

No comments:

Post a Comment