public function __destruct()
{
static $depth = 0;
// destruct can be called several times
if ($depth < self::$maximumDepthLevelAllowed && isset($this->rows)) {
$depth++;
foreach ($this->rows as $row) {
Common::destroy($row);
}
if (isset($this->summaryRow)) {
Common::destroy($this->summaryRow);
}
unset($this->rows);
Manager::getInstance()->setTableDeleted($this->currentId);
$depth--;
}
}