From 22f02b35ad58030a093563a7df683962b4d165c5 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 15 Dec 2009 12:38:15 -0500 Subject: [PATCH] call DB_DataObject::__destruct() if it exists --- classes/Memcached_DataObject.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php index 360fb44243..70e9e351d5 100644 --- a/classes/Memcached_DataObject.php +++ b/classes/Memcached_DataObject.php @@ -28,9 +28,13 @@ class Memcached_DataObject extends DB_DataObject * 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) -- 2.39.5