Spot\Entity::__destruct PHP Method

__destruct() public method

Do some cleanup of stored relations so orphaned relations are not held in memory
public __destruct ( )
    public function __destruct()
    {
        $entityName = get_class($this);
        if (isset(self::$relationFields[$entityName])) {
            foreach (self::$relationFields[$entityName] as $relation) {
                $this->relation($relation, false);
            }
        }
    }