From e3cf4a762dff0f826a28bd88ae930914c4ffd79e Mon Sep 17 00:00:00 2001 From: Charlie Groves Date: Tue, 29 Apr 2008 17:55:03 +0000 Subject: [PATCH] Knock the idleUnloadPeriod down to 0 since GameManagers don't go idle and having a shutdown interval just keeps them resident in memory git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@586 c613c5cb-e716-0410-b11b-feb51c14d237 --- .../threerings/parlor/game/server/GameManager.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/java/com/threerings/parlor/game/server/GameManager.java b/src/java/com/threerings/parlor/game/server/GameManager.java index 285e2b83..af322300 100644 --- a/src/java/com/threerings/parlor/game/server/GameManager.java +++ b/src/java/com/threerings/parlor/game/server/GameManager.java @@ -23,7 +23,6 @@ package com.threerings.parlor.game.server; import java.util.ArrayList; import java.util.Arrays; -import java.util.Iterator; import java.util.logging.Level; import com.samskivert.util.ArrayIntSet; @@ -34,16 +33,12 @@ import com.samskivert.util.StringUtil; import com.samskivert.util.Tuple; import com.threerings.util.Name; -import com.threerings.presents.data.ClientObject; import com.threerings.presents.dobj.AttributeChangeListener; import com.threerings.presents.dobj.AttributeChangedEvent; import com.threerings.presents.dobj.DObject; -import com.threerings.presents.dobj.MessageEvent; - import com.threerings.crowd.chat.server.SpeakUtil; import com.threerings.crowd.data.BodyObject; -import com.threerings.crowd.data.PlaceObject; import com.threerings.crowd.server.CrowdServer; import com.threerings.crowd.server.PlaceManager; import com.threerings.crowd.server.PlaceManagerDelegate; @@ -852,6 +847,14 @@ public class GameManager extends PlaceManager super.bodyLeft(bodyOid); } + @Override // from PlaceManager + protected long idleUnloadPeriod () + { + // We shutdown immediately on becoming empty, so there's no need to create a + // shutdown interval to keep us in memory longer than we would be otherwise + return 0; + } + /** * When a game room becomes empty, we cancel the game if it's still in progress and close down * the game room.