diff options
author | Evan Prodromou <evan@status.net> | 2009-12-15 16:24:52 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-12-15 16:24:52 -0500 |
commit | 2a1468ec8b2918553b490ddaef6bdede3e2d5b1b (patch) | |
tree | c94a68a1239a5a3c35d5564323967fcd4ff14523 /classes/Memcached_DataObject.php | |
parent | e9b733e7f036bc03353ae6dd7b096ea179698a4d (diff) | |
parent | f3d27cc3ae92e2b7412dd998d7de7a2b58dc8e6a (diff) |
Merge branch '0.9.x' into testing
Diffstat (limited to 'classes/Memcached_DataObject.php')
-rw-r--r-- | classes/Memcached_DataObject.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php index 753fe954e..70e9e351d 100644 --- a/classes/Memcached_DataObject.php +++ b/classes/Memcached_DataObject.php @@ -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)) { |