def exit
      if @cache && @cache.in_transaction?
        @cache.abort_transaction
        @cache.flush
        @db.close if @db
        PEROBS.log.fatal "You cannot call exit() during a transaction: #{Kernel.caller}"
      end
      @cache.flush if @cache
      @db.close if @db
      @db = @class_map = @in_memory_objects = @stats = @cache = @root_objects =
        nil
    end
def exit
      if @cache && @cache.in_transaction?
        @cache.abort_transaction
        @cache.flush
        @db.close if @db
        PEROBS.log.fatal "You cannot call exit() during a transaction: #{Kernel.caller}"
      end
      @cache.flush if @cache
      @db.close if @db
      @db = @class_map = @in_memory_objects = @stats = @cache = @root_objects =
        nil
    end
Close the store and ensure that all in-memory objects are written out to
 the storage backend. The Store object is no longer usable after this
 method was called.