[Zodb-checkins] SVN: ZODB/branches/shane-poll-invalidations/src/ZODB/ explicitly release storage resources

Shane Hathaway shane at hathawaymix.org
Sat Apr 25 19:27:13 EDT 2009


Log message for revision 99498:
  explicitly release storage resources
  

Changed:
  U   ZODB/branches/shane-poll-invalidations/src/ZODB/Connection.py
  U   ZODB/branches/shane-poll-invalidations/src/ZODB/DB.py

-=-
Modified: ZODB/branches/shane-poll-invalidations/src/ZODB/Connection.py
===================================================================
--- ZODB/branches/shane-poll-invalidations/src/ZODB/Connection.py	2009-04-25 23:24:25 UTC (rev 99497)
+++ ZODB/branches/shane-poll-invalidations/src/ZODB/Connection.py	2009-04-25 23:27:13 UTC (rev 99498)
@@ -1073,6 +1073,11 @@
         if getattr(self, '_reader', None) is not None:
             self._reader._cache = cache
 
+    def _releaseStorage(self):
+        """Tell the storage to release resources it's using"""
+        if self._mvcc_storage:
+            self._storage.release()
+
     ##########################################################################
     # Python protocol
 

Modified: ZODB/branches/shane-poll-invalidations/src/ZODB/DB.py
===================================================================
--- ZODB/branches/shane-poll-invalidations/src/ZODB/DB.py	2009-04-25 23:24:25 UTC (rev 99497)
+++ ZODB/branches/shane-poll-invalidations/src/ZODB/DB.py	2009-04-25 23:27:13 UTC (rev 99498)
@@ -186,6 +186,7 @@
             # reclaim `c` now, and `c` would be left in a user-visible
             # crazy state.
             c._resetCache()
+            c._releaseStorage()
 
     def reduce_size(self):
         self._reduce_size()



More information about the Zodb-checkins mailing list