/** * Restores an image from serialization. Called automatically upon unserialize(). */ function __wakeup() { $temp_image = WideImage::loadFromString($this->sdata); $temp_image->releaseHandle(); $this->handle = $temp_image->handle; $temp_image = null; $this->sdata = null; }