C++ STL Memory Management
===

Normally when I use STL objects that are in a non-local scope I store pointers to the data I want to store. For instance

    std::vector<MyStruct*> 

When it's time to cleanup the vector I then go through and delete everything. I've recently noticed that this isn't necessary like I thought it was. For whatever reason I was thinking the STL classes stored data on the stack, whereas I now think it allocates it on the heap. Is this correct? Is the only real benefit to storing objects as pointers to reduce copy time?

Thanks
