title: Object references persisting between application runs
body: <p>I have a collection of objects, some of which reference others. The referencing is implemented using pointers, however pointers do not persist between application runs - the data structures are serialized and deserialized, but each time their memory addresses of the actual objects are different.</p>
  
  <p>I have implemented a hash table, using integer ids as keys and pointers as values, storing the ids and using them to lookup the object pointer for each id. Sometimes references to objects are created before the actual referenced object is created, so in such cases I have to implement a check for this id, and inform the objects, referencing that id the moment an object with such id is created. </p>
  
  <p>It works, but I feel like it is clumsy and inefficient. So my question is whether there is established design pattern to deal with this problem.</p>