title: Does using the "new" statement on an already created object cause memory leaks?
body: <p>I did some research on this question but I haven't really found an answer.</p>
  
  <p>For example, I know that if I wrote this in a game loop:</p>
  
  <pre><code>public void update () {
      Object object = new Object();
  }
  </code></pre>
  
  <p>Then I would have a memory leak.</p>
  
  <p>But if you have a class object you are calling <code>new</code> on, it wouldn't cause a memory leak, right? Since you aren't creating another object, you're just giving the current object a new value.</p>
  
  <p>For example:</p>
  
  <pre><code>private Object object;
  
  //...
  
  public void update () {
      object = new Object();
  }
  </code></pre>
  
  <p>-Edit</p>
  
  <p>Thanks for your help! I now see that I pretty much had no clue what a memory leak is or what causes it... But I understand more now than I did before!</p>