THRIFT-464. cpp: Fix some STL misuse in the concurrency library
authorDavid Reiss <dreiss@apache.org>
Thu, 4 Jun 2009 00:32:47 +0000 (00:32 +0000)
committerDavid Reiss <dreiss@apache.org>
Thu, 4 Jun 2009 00:32:47 +0000 (00:32 +0000)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@781627 13f79535-47bb-0310-9956-ffa450edef68

lib/cpp/src/concurrency/TimerManager.cpp

index 861a62f..003e315 100644 (file)
@@ -208,9 +208,7 @@ void TimerManager::stop() {
 
   if (doStop) {
     // Clean up any outstanding tasks
-    for (task_iterator ix =  taskMap_.begin(); ix != taskMap_.end(); ix++) {
-      taskMap_.erase(ix);
-    }
+    taskMap_.clear();
 
     // Remove dispatcher's reference to us.
     dispatcher_->manager_ = NULL;