Making a Deep Copy
Sometimes it is important for the copy of a handle to be a deep copy, which instantiates a new body class for the new handle to reference, rather than having the new handle point to the same body class. HydraExpress datatype classes all define a clone() method for creating deep copies. If in the above example, line //1 was changed to:
 
USAddress address2 = address1.clone();
the output of the example code would become
 
address1 is Robert Smith at 1234 Main Street
since setting data on the address2 handle no longer changes the data in the address1 body.