Update streams in reverse order so that they can dispose of themselves

safely.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4116 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Andrzej Kapolka
2006-05-15 04:04:06 +00:00
parent bd8d25b6dd
commit 0224c33c45
@@ -120,8 +120,10 @@ public class SoundManager
*/
public void updateStreams (float time)
{
for (Stream stream : _streams) {
stream.update(time);
// iterate backwards through the list so that streams can dispose of
// themselves during their update
for (int ii = _streams.size() - 1; ii >= 0; ii--) {
_streams.get(ii).update(time);
}
}