This discussion is archived
5 Replies Latest reply: Jan 17, 2012 4:39 AM by sabre150 RSS

What happens when I assign null to a Thread object?

910943 Newbie
Currently Being Moderated
What happens to the resources created in object t when I assign null to it at the end of the code?


          CellsiteThread t = new CellsiteThread();
          t.setCellsiteLocationCallback(this);
          t.start();

          long start = System.currentTimeMillis();
          while (!completed && !timedout) {
               if (System.currentTimeMillis() - start > TIMEOUT)
                    timedout = true;               
          }
          t = null;

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points