Use an LRU cache for our config properties files.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3388 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -148,6 +148,7 @@ public class SoundManager
|
|||||||
*/
|
*/
|
||||||
public void shutdown ()
|
public void shutdown ()
|
||||||
{
|
{
|
||||||
|
// TODO: we need to stop any looping sounds
|
||||||
synchronized (_queue) {
|
synchronized (_queue) {
|
||||||
_queue.clear();
|
_queue.clear();
|
||||||
if (_spoolerCount > 0) {
|
if (_spoolerCount > 0) {
|
||||||
@@ -156,6 +157,7 @@ public class SoundManager
|
|||||||
}
|
}
|
||||||
synchronized (_clipCache) {
|
synchronized (_clipCache) {
|
||||||
_lockedClips.clear();
|
_lockedClips.clear();
|
||||||
|
_configs.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -906,7 +908,7 @@ public class SoundManager
|
|||||||
protected HashSet _disabledTypes = new HashSet();
|
protected HashSet _disabledTypes = new HashSet();
|
||||||
|
|
||||||
/** A cache of config objects we've created. */
|
/** A cache of config objects we've created. */
|
||||||
protected HashMap _configs = new HashMap();
|
protected LRUHashMap _configs = new LRUHashMap(5);
|
||||||
|
|
||||||
/** Soundkey command constants. */
|
/** Soundkey command constants. */
|
||||||
protected static final byte PLAY = 0;
|
protected static final byte PLAY = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user