Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

STL Iterators

Name: Anonymous 2011-11-22 21:14

Do STL iterators need to be deleted when you're done with them? If I remember right, iterators are nothing but pointers that have been gussied up, but do they have their own destructors that clean up all their internal mess? I can't remember for the life of me and google is no help.

Name: Anonymous 2011-11-23 0:08

>>9

It could be useful for an object to store an iterator which refers to a position within some external collection. You would need to be care about how the iterators were used though, if any of the objects were to try to delete portions of the collection using the iterators, it could be bad.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List