File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -522,25 +522,20 @@ int i;
522
522
udpSocketIterator++)
523
523
delete udpSocketIterator->second ;
524
524
525
- // delete chat sessions
525
+ // delete chat sessions
526
526
527
527
DELETE_LIST (m_ChatList);
528
528
529
- // delete plugins
530
-
531
- PluginListIterator pit = m_PluginList.begin ();
529
+ // delete plugins
532
530
533
531
// we have to do it this way, because otherwise if a plugin attempts to access the
534
532
// plugin list (eg. BroadcastPlugin, Trace) during the delete operation, then it
535
533
// may call a plugin that was deleted a moment ago, but is still in the list.
536
534
537
- while (pit != m_PluginList.end ())
538
- {
539
- CPlugin * pPlugin = *pit; // get this one
540
- pit = m_PluginList.erase (pit); // remove from list, move onto next one
541
- delete pPlugin; // delete *this* one
542
- }
543
-
535
+ for (PluginListIterator pit = m_PluginList.begin ();
536
+ pit != m_PluginList.end ();
537
+ pit = m_PluginList.erase (pit)) // erase from list and get next one
538
+ delete *pit; // delete *this* one
544
539
545
540
CloseLog (); // this writes out the log file postamble as well
546
541
You can’t perform that action at this time.
0 commit comments