D
drjackman
I have a quick question for you STL gurus out there. Suppose I do
something like this:
vector <myClass*> foo;
foo.push_back(new myClass());
Does this work in C++? I know you can do it in C# and Java. Also, if
you call foo.clear(), are the objects deleted properly (any memory
leaks doing this kind of thing)?
Thanks for your input!
DR
something like this:
vector <myClass*> foo;
foo.push_back(new myClass());
Does this work in C++? I know you can do it in C# and Java. Also, if
you call foo.clear(), are the objects deleted properly (any memory
leaks doing this kind of thing)?
Thanks for your input!
DR