Destruction and things in stl containers...

Started by
1 comment, last by gimp 22 years, 2 months ago
Do these strings get released no destruction of the vector? std::vector Strings; When the vector is destroyed do the strings get their destructors called? Is it only pointers in containers that I need to care about? Thanks Chris Brodie http:\\fourth.flipcode.com
Chris Brodie
Advertisement
I''m pretty sure you only need to worry about pointers, the containers should make certain that only constructed objects have thier dtor''s invoked on them.
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Anything in an STL container will get its destructor called. It''s just that pointers have a destructor that does nothing.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost ]

This topic is closed to new replies.

Advertisement