P
Piotr
If I have a vector of string, is a call to 'empty()' sufficient to free
the all memory (i.e. no memory leaks)?
vector <string> str_vector;
str_vector.push_back("hello");
str_vector.push_back("world");
str_vector.empty();
And what if i have a vector of string pointer.
vecto <string*> str_vector;
string* str1= new string();
string* str2= new string();
str_vector.push_back(str1);
str_vector.push_back(str1);
str_vector.empty();
the all memory (i.e. no memory leaks)?
vector <string> str_vector;
str_vector.push_back("hello");
str_vector.push_back("world");
str_vector.empty();
And what if i have a vector of string pointer.
vecto <string*> str_vector;
string* str1= new string();
string* str2= new string();
str_vector.push_back(str1);
str_vector.push_back(str1);
str_vector.empty();