在类的实例化过程中记录下每个实例
class Schedule
{
public static ArrayList ScheduleList;
public Schedule(){
ScheduleList.add(this);//
未将对象引用设置到对象的实例?
}
}
------解决方案--------------------class Schedule
{
public static ArrayList ScheduleList;
public Schedule(){
if(ScheduleList == null)
{
ScheduleList = new ArrayList();
}
ScheduleList.add(this);//未将对象引用设置到对象的实例?
}
}