System.gc , . , , , . , .
while (true) {
final ArrayBlockingQueue<Integer> abq = new ArrayBlockingQueue<Integer>(2);
final Thread t = new Thread(new Runnable() {
@Override
public void run() {
try {
abq.take();
} catch (final InterruptedException e) {
e.printStackTrace();
}
}
});
t.start();
}
- , , t - , abq.take? run abq , GC , .
, . Java , , , Runnable. , abq, run, , .