Like in the following example:
#include <vector>
class VectorContainer {
private:
std::vector<int> v;
public:
void AddStuffToVector() {
this->v.push_back(4);
this->v.push_back(3);
this->v.push_back(2);
this->v.push_back(6);
}
};
int main() {
VectorContainer a;
a.AddStuffToVector();
a = VectorContainer();
}
Will the items added to the vector inside a
leak after reassignment?