vector<A*> vec;vec.push_back(new A());vec.pop_back();delete vec[0];
| if i specify memory with new operator to a pointer and i don't free the space with delete operator, what will be the result? will i get an error later? or it'll just take the memory until the computer restarted? |
if i create a vector(in std library), something like this: [...]am i still need to free the space before popping back? |