That is, if vector<vector<string> > con; , then con.clear(); will clear all elements and their vectors with strings or will there be a memory leak?

    1 answer 1

    Yes, it deletes, and at the same time, the root vector will cause the destructors of the member objects it has stored.