B
berthelot samuel
hi all,
I have a simple question. I use a stl vector of pointers on objects of
my own class, say Person:
vector<Person*> vectPerson;
vectPerson.push_back(new Person("Sam"));
when I call vectPerson.pop_back, do i need to take care of the pointer
by calling delete or does the pop method handle this for me ?
thx
Sam
I have a simple question. I use a stl vector of pointers on objects of
my own class, say Person:
vector<Person*> vectPerson;
vectPerson.push_back(new Person("Sam"));
when I call vectPerson.pop_back, do i need to take care of the pointer
by calling delete or does the pop method handle this for me ?
thx
Sam