奇妙なシナリオが発生しています。新しいオブジェクトを初期化するときに、JVMがすでに作成されたオブジェクトを再利用する可能性があり、オブジェクト数はJVmが非常に高いですか?
abc a = new abc();
a.setAttribute("aaaa");
.........
a...is no longer being used...and has not yet been garbage collected by the JVM. There are multiple threads creating 5000 instances of class abc..
again, abc a = new abc();
Sysout(a.getAttribute()); // This prints "aaaa" set for an earlier instance!
インスタンスが再利用される可能性はありますか?誰かが以前にこのシナリオに出くわしたことがありますか?