[pypy-svn] r71420 - pypy/trunk/pypy/interpreter

arigo at codespeak.net arigo at codespeak.net
Mon Feb 22 18:37:44 CET 2010


Author: arigo
Date: Mon Feb 22 18:37:42 2010
New Revision: 71420

Modified:
   pypy/trunk/pypy/interpreter/executioncontext.py
Log:
Clear the items from the list as soon as possible.
Might not change much, but my guess is that if one
of these objects is large, freeing it earlier is
better.


Modified: pypy/trunk/pypy/interpreter/executioncontext.py
==============================================================================
--- pypy/trunk/pypy/interpreter/executioncontext.py	(original)
+++ pypy/trunk/pypy/interpreter/executioncontext.py	Mon Feb 22 18:37:42 2010
@@ -494,7 +494,9 @@
         pending_w = self.dying_objects_w
         self.dying_objects_w = []
         space = self.space
-        for w_obj in pending_w:
+        for i in range(len(pending_w)):
+            w_obj = pending_w[i]
+            pending_w[i] = None
             try:
                 space.userdel(w_obj)
             except OperationError, e:



More information about the Pypy-commit mailing list