The C++ Reference says for the container class vector, its destructor, 
"Destructs the container object. This calls each of the contained element's 
destructors, and deallocates all the storage capacity allocated by the vector."

If I have a container of references to objects (is this the syntax?)

     vector <*person> my_container

when my_container's destructor is called, does it call the destructors for each 
object to which the pointers point, or does it just destroy the pointers?

If it destroys the objects, then I must reference count (or something) to 
prevent their destruction, right?

Thanks,

Jimmy J. Johnson


Reply via email to