nicknezis opened a new pull request #3767:
URL: https://github.com/apache/incubator-heron/pull/3767


   This fixes an issue in which we deleted an item in a loop which invalidated 
the iterator. An example can be found here: https://stackoverflow.com/a/4636230
   
   Could update to use the returned `itr` as shown below:
   ```
     for (auto itr = common.instanceid_instance_.begin();
          itr != common.instanceid_instance_.end(); ++itr)
         itr = common.instanceid_instance_.erase(itr);
   ```
   But I instead opted for the `map.clear()` because the map values are of type 
`shared_ptr`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to