def _transfer(store)
      @store = store
      # Remove the previously defined finalizer as it is attached to the old
      # store.
      ObjectSpace.undefine_finalizer(self)
      # Register the object as in-memory object with the new store.
      @store._register_in_memory(self, @_id)
      # Register the finalizer for the new store.
      ObjectSpace.define_finalizer(
        self, ObjectBase._finalize(@store, @_id, object_id))
      @myself = POXReference.new(@store, @_id)
    end
def _transfer(store)
      @store = store
      # Remove the previously defined finalizer as it is attached to the old
      # store.
      ObjectSpace.undefine_finalizer(self)
      # Register the object as in-memory object with the new store.
      @store._register_in_memory(self, @_id)
      # Register the finalizer for the new store.
      ObjectSpace.define_finalizer(
        self, ObjectBase._finalize(@store, @_id, object_id))
      @myself = POXReference.new(@store, @_id)
    end
Library internal method to transfer the Object to a new store.
 @param store [Store] New store