Content received from: http://JavaFAQ.nu/java-article135.html
My program creates a huge number of objects dynamically and even more inside eac
Friday, May 23, 2003 (00:00:00)
Posted by jalex
Question: My Java program creates a huge
number of objects dynamically and even more inside each of them...
One thread does some processing and when the user calls a method on the object,
it will kill the thread.
After that the object has to be killed so that it can be garbage collected...
How do I do it?
Answer: You do not "kill" objects, just
stop just keeping any references to them and garbage collector will find all
objects that are "dereferenced" and do the