Clear the snapshot array when we're done applying an op so that we don't

retain references that will interfere with garbage collection.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1792 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
andrzej
2006-02-23 03:10:47 +00:00
parent 58cbc0e496
commit 478a5826a0
@@ -4,6 +4,7 @@
package com.samskivert.util;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import com.samskivert.Log;
@@ -191,7 +192,9 @@ public class ObserverList extends ArrayList
remove(_snap[ii]);
}
}
// clear out the snapshot so its contents can be gc'd
Arrays.fill(_snap, null);
} else if (_policy == FAST_UNSAFE_NOTIFY) {
int ocount = size();
for (int ii = ocount-1; ii >= 0; ii--) {