1
Answer

How does serialisation handle references to an object?

Mark Anders

Mark Anders

10y
580
1
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.




Answers (1)