Using thread = null will not release a running thread. In order to release the memory associated with a thread, you need to make sure that all of the following are done:Make sure that the thread's start() method has been called.
Make sure that the thread has stopped executing.
Clear any references to that Thread object (thread = null;).
This is the best you can do to ensure the release of memory for a Thread. You have to call start() on the thread because several JVMs have a bug where they will not release all the thread's memory if the thread is not started.
Make sure that the thread has stopped executing.
Clear any references to that Thread object (thread = null;).
This is the best you can do to ensure the release of memory for a Thread. You have to call start() on the thread because several JVMs have a bug where they will not release all the thread's memory if the thread is not started.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货