title: Switch object references
body: <p>I have these two objects (<code>u1</code> and <code>u2</code>, being assigned to <code>Object 1</code> and <code>Object 2</code>, respectivly)</p>
  
  <pre><code>u1 = Object 1;
  u2 = Object 2;
  </code></pre>
  
  <p>Now I want so switch the assignments later, so I would use this: </p>
  
  <pre><code>u1 = Object 2;
  u2 = null;
  </code></pre>
  
  <p>I've tried this:</p>
  
  <pre><code>u1 = u2;
  u2 = null
  </code></pre>
  
  <p>but This doesn't work because both <code>u1</code> and <code>u2</code> are assigned <code>null</code>.</p>
  
  <p>How can I solve this? I can't use the clone method because I need more than a shallow copy</p>