|
@@ -695,7 +695,7 @@ class DictRefCounter:
|
|
def Clear(self):
|
|
def Clear(self):
|
|
"""Clears items which are not needed any more."""
|
|
"""Clears items which are not needed any more."""
|
|
Debug.msg(4, 'DictRefCounter.Clear')
|
|
Debug.msg(4, 'DictRefCounter.Clear')
|
|
- for key in self.dictionary.keys():
|
|
|
|
|
|
+ for key in self.dictionary.copy().keys():
|
|
if key is not None:
|
|
if key is not None:
|
|
if self.referenceCount[key] <= 0:
|
|
if self.referenceCount[key] <= 0:
|
|
del self.dictionary[key]
|
|
del self.dictionary[key]
|