When saving to a file for example, if i have two objects with references to the same, third object. When these are deserialised do the the two objects now reference two independent but identical objects? It seems that way, therefore is it better to save all the objects seperately and then recconect them after deserialisiation? So that the two objects now both have references to one, third object?
Did i miss something here? Its kind of a newbie question but i have a large program with multiple objects referencing each other and need them to be the same after deserialisation.
How does serialisation handle references to an object?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Sep 20, 2014, 3:13 AM EDT
So, yes, if you want your two objects to refer to the same third object, it will be best to serialize them all separately and then reconnect them after deserialization.