source: Dev/trunk/src/client/util/docscripts/lib/parser2/Destructable.php

Last change on this file was 483, checked in by hendrikvanantwerpen, 11 years ago

Added Dojo 1.9.3 release.

File size: 471 bytes
Line 
1<?php
2
3abstract class Destructable {
4  protected function mem_flush() {
5    foreach (func_get_args() as $key) {
6      if ($this->$key) {
7        if (is_object($this->$key)) {
8          $this->$key->__destruct();
9        }
10        elseif (is_array($this->$key)) {
11          foreach ($this->$key as $loc => $value) {
12            if (is_object($value)) {
13              $value->__destruct();
14            }
15          }
16        }
17        unset($this->$key);
18      }
19    }
20  }
21}
Note: See TracBrowser for help on using the repository browser.