Use deque<T> rather than vector<T*> since it provides the same invalidation semantics...