]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Revert "Take Memcached_DataObject destructor back out to check whether it might be...
authorBrion Vibber <brion@status.net>
Mon, 4 Jan 2010 22:37:39 +0000 (14:37 -0800)
committerBrion Vibber <brion@status.net>
Mon, 4 Jan 2010 22:37:39 +0000 (14:37 -0800)
This reverts commit 89cca01259d71f3da961ef64def3647f86a01567.

classes/Memcached_DataObject.php

index b43cb0b56f85ae5b570843ea06a4c1b7dd08e384..d89a9421e6099905e1c5add3efef0f8d22ee9dfe 100644 (file)
@@ -23,6 +23,20 @@ require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
 
 class Memcached_DataObject extends DB_DataObject
 {
+    /**
+     * Destructor to free global memory resources associated with
+     * this data object when it's unset or goes out of scope.
+     * DB_DataObject doesn't do this yet by itself.
+     */
+
+    function __destruct()
+    {
+        $this->free();
+        if (method_exists('DB_DataObject', '__destruct')) {
+            parent::__destruct();
+        }
+    }
+
     function &staticGet($cls, $k, $v=null)
     {
         if (is_null($v)) {