K
Karim
Hi,
There is a certain structure that I need and I am planning to implement
but I wanted to make sure nothing similar that already exists.
My main objective is to have a vector that mainly carries pointers and
in it destructor, it would delete those pointers.
so it would be auto_vector<Class1 *> autoVec;
autoVec.push_back(new Class1());
and somewhere in ~auto_vec there would be a delete for all memebers.
My question is, is there anything in STL that already does this
funtionality? and does anyone see any potential issues with this.
Thanks.
There is a certain structure that I need and I am planning to implement
but I wanted to make sure nothing similar that already exists.
My main objective is to have a vector that mainly carries pointers and
in it destructor, it would delete those pointers.
so it would be auto_vector<Class1 *> autoVec;
autoVec.push_back(new Class1());
and somewhere in ~auto_vec there would be a delete for all memebers.
My question is, is there anything in STL that already does this
funtionality? and does anyone see any potential issues with this.
Thanks.