Commit 2806b939 authored by bozimmerman's avatar bozimmerman

Better cleanup for area thin instance children.

git-svn-id: svn://192.168.1.10/public/CoffeeMud@15458 0d6f1817-ed0e-0410-87c9-987e46238f29
parent 3574b9e2
......@@ -432,20 +432,23 @@ public class StdThinInstance extends StdThinArea
super.destroy();
if(this.doesManageChildAreas())
{
List<Area> cs = new ArrayList<Area>();
List<AreaInstanceChild> cs = new ArrayList<AreaInstanceChild>(instanceChildren.size());
synchronized(instanceChildren)
{
for(int i=instanceChildren.size()-1;i>=0;i--)
cs.add(instanceChildren.get(i).A);
cs.add(instanceChildren.get(i));
instanceChildren.clear();
}
for(Area A : cs)
for(AreaInstanceChild I : cs)
{
final MOB mob=CMClass.sampleMOB();
for(final Enumeration<Room> e=A.getProperMap();e.hasMoreElements();)
final Area A=I.A;
try
{
final Room R=e.nextElement();
R.executeMsg(mob,CMClass.getMsg(mob,R,null,CMMsg.MSG_EXPIRE,null));
flushInstance(I);
}
catch(Exception e)
{
Log.errOut(e);
}
CMLib.map().delArea(A);
A.destroy();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment