Possible Duplicate:
Does setting Java objects to null do anything anymore?
I am using a same variable again and again in a method & referring it to a new object at many a times.. Is it a good practice from garbage collection aspect to nullify it before making it refer a new object.
Example:
StopWatch watch = new StopWatch();
watch.start();
//some code
watch.stop();
//some code
watch = null;
watch = new StopWatch();
watch.start();
//some code
watch.stop();
//some code
Not sure whether nullifying it make a difference to GC in this case. Please guide.
Thanks!