4
Javaスレッドガベージが収集されたかどうか
この質問はいくつかのサイトに投稿されました。正しい答えが見つからなかったので、ここにもう一度投稿します。 public class TestThread { public static void main(String[] s) { // anonymous class extends Thread Thread t = new Thread() { public void run() { // infinite loop while (true) { try { Thread.sleep(1000); } catch (InterruptedException e) { } // as long as this line printed out, you …