Original Post
I use the vector class to store pointers instead of entire classes, so that I can do the memory management myself and not have to copy an entire class when adding it to the vector. I'm not completely familiar with STL yet, so I may misunderstand it altogether. Anyhow, I create the vector with a pointer to a structure. When I call insert(), I pass the pointers in. What happens when I call vector::clear()? According to what I've read, it calls the destructors for classes. I'm a little confused about what memory management will take place with the call to clear(). I want to make sure I get the used memory de-allocated. I think it will just de-allocate the memory used to store the pointers, but I still have to destroy the referenced object. Is this true? Thanks in advance. Chris