getMessage(), "\n"; } } self::$resources[spl_object_hash($this)] = 1; } protected function acquire($handle) { $this->native = $handle; } protected function release() { $this->native = null; } function __destruct() { // Should have been destroyed and released by derived resource assert($this->native == null); unset(self::$resources[spl_object_hash($this)]); } }