读书人

有人遇见过对象申请不下来的情况吗?等

发布时间: 2011-11-06 07:07:53 作者: rapoo

有人碰见过对象申请不下来的情况吗?等待中
System.out.println( "eee in the file of PackageApplicationManagementAgent_ApplicationManagementAgent ");
GUIAgent = new PackageGUIAgent_GUIAgent(this);
System.out.println( "aab in the file of PackageApplicationManagementAgent_ApplicationManagementAgent ");
中间申请对象程序就不走了,也不报错,什么问题

[解决办法]
很有可能是你在
PackageGUIAgent_GUIAgent的构造函数里面对PackageGUIAgent_GUIAgent进行了new操作
这样就会循环申请空间,导致程序一直在吃内存,运行不下去
[解决办法]
这样写会有问题么?---- GUIAgent = new PackageGUIAgent_GUIAgent(this);

读书人网 >J2SE开发

热点推荐