根据日志,确实发生了FullGC,计算资源被耗光 Java HotSpot(TM) 64-Bit Server VM (24.79-b02) for windows-amd64 JRE (1.7.0_79-b15), built on Apr 10 2015 12:36:16 by "java_re" with unknown MS VC++:1600 Memory: 4k page, physical 8297976k(4972260k free), swap 16594112k(1
这个有趣的问题感谢装配脑袋友情提供. 请看如下代码: public class Dummy { public static Dummy Instance; public int X = 1; ~Dummy() { Instance = this; } } 通过如下代码进行调用(输出日志的地方我稍作调整): Task.Run(() => { var d = new Dummy(); d = null; GC.Collect(); GC.WaitForFullGCComplete(); }).Wai