I'm using BoundsChecker9.1 with visual c++. I have a class
class Sample{
public:
vector<AnotherClass> x;
};
When I run my program the BoundsChecker tool reports all push_back() calls such as S.x.push_back(AnotherClass()) as memory leak.. Wouldn't all the elements in vector x will always be deallocated when the Sample class goes out of scope? If so, any idea about why BoundsChecker is showing them as memory leak? And I verified that "AnotherClass" doesnt have any memory leak either!!