title: Should i nullify an interrupted thread?
body: <p>I created a thread like this:</p>
  
  <pre><code>private Thread t = new Thread() {
  @Override
  public void run() {
      try {
          while(true) {
          // do work
          Thread.sleep(1000);
          }
      } catch (InterruptedException ex) {
      }
  }
  };
  t.start();
  </code></pre>
  
  <p>Then i interrupted it using <code>t.interrupt()</code>.</p>
  
  <p>As soon the thread stops and get on sleep() it will interrupt and become unusable, but will it stay on memory?</p>
  
  <p>Do i have to call <code>t = null</code>, or the GC will take care of that?</p>
  
  <p>I'm trying to dynamically interrupt the thread and recreate it when needed (using <code>t = new Thread()</code>), but im not sure if just interrupt() removes the old thread from memory. I've searched but couldn't find this specfic answer.</p>