function clear_object(&$object)
 {
     if (is_object($object)) {
         foreach ($object as &$value) {
             clear_object($value);
         }
     }
     $object = null;
     unset($object);
 }
 function dispose()
 {
     clear_object($this);
 }
Exemplo n.º 3
0
/**
 * Affect null to the unused objects
 * @param unknown_type $object
 */
function clear_object(&$object)
{
    if (is_object($object)) {
        foreach (array_keys((array) $object) as $key) {
            clear_object($property);
        }
        foreach (get_class_vars(get_class($object)) as $property => $value) {
            clear_object($property);
        }
    }
    $object = null;
    unset($object);
}
Exemplo n.º 4
0
 /**
  * Class destructor
  */
 function __destruct()
 {
     clear_object($this);
 }
 /**
  * Class destructor
  *
  * Deletes all temporary image files
  */
 function __destruct()
 {
     foreach ($this->_image_cache as $img) {
         //debugpng
         if (DEBUGPNG) {
             print '[__destruct unlink ' . $img . ']';
         }
         if (!DEBUGKEEPTEMP) {
             unlink($img);
         }
     }
     clear_object($this);
 }