gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/trunk r12236: rewrite reslist scan to be s


From: Sandro Santilli
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r12236: rewrite reslist scan to be safe in case of list change on delete of GcResources
Date: Thu, 10 Jun 2010 14:31:18 +0200
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 12236
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Thu 2010-06-10 14:31:18 +0200
message:
  rewrite reslist scan to be safe in case of list change on delete of 
GcResources
modified:
  libbase/GC.cpp
=== modified file 'libbase/GC.cpp'
--- a/libbase/GC.cpp    2010-01-25 18:52:20 +0000
+++ b/libbase/GC.cpp    2010-06-10 12:31:18 +0000
@@ -59,12 +59,9 @@
     log_debug(_("GC deleted, deleting all managed resources - collector run %d 
times"), _collectorRuns);
 #endif
 
-#if 1
-    for (ResList::iterator i=_resList.begin(), e=_resList.end(); i!=e; ++i)
-    {
-        delete *i;
+    while ( !_resList.empty() ) {
+        delete _resList.front();
     }
-#endif
 }
 
 size_t


reply via email to

[Prev in Thread] Current Thread [Next in Thread]