Method: PEROBS::ObjectBase#_transfer
- Defined in:
- lib/perobs/ObjectBase.rb
#_transfer(store) ⇒ Object
Library internal method to transfer the Object to a new store.
179 180 181 182 183 184 185 186 187 188 189 190 |
# File 'lib/perobs/ObjectBase.rb', line 179 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 |