This topic has not yet been written. The content below is from the topic description.
All of the basic types of Java (int, long, etc.) can be saved and restored from an InputObjectState or OutputObjectState instance by using the pack and unpack routines provided by InputObjectState and OutputObjectState. However packing and unpacking objects should be handled differently. This is because packing objects brings in the additional problems of aliasing. Aliasing happens when two different object references may point at the same item. For example: Example 4.2. Aliasing public class Test { public Test (String s); ... private String s1; private String s2; }; public Test (String s) { s1 = s; s2 = s; } Here, both s1 and s2 point at the same string. A naive implementation of save_state might copy the string twice. From a save_state perspective this is simply inefficient. However, restore_state would unpack the two strings into different areas of memory, destroying the original aliasing information. The current version of TxCore packs and unpacks separate object references.