Merge pull request #1348 from millmanorama/stop_garbage_collection_listeners

keep a reference to public unmodifiable view of fileids so that liste…
This commit is contained in:
Richard Cordovano 2015-06-11 15:57:30 -04:00
commit 19592a9994

View File

@ -41,13 +41,15 @@ public class DrawableGroup implements Comparable<DrawableGroup> {
}
private final ObservableList<Long> fileIDs = FXCollections.observableArrayList();
private final ObservableList<Long> unmodifiableFileIDS = FXCollections.unmodifiableObservableList(fileIDs);
//cache the number of files in this groups with hashset hits
private long hashSetHitsCount = -1;
private final ReadOnlyBooleanWrapper seen = new ReadOnlyBooleanWrapper(false);
@SuppressWarnings("ReturnOfCollectionOrArrayField")
synchronized public ObservableList<Long> fileIds() {
return FXCollections.unmodifiableObservableList(fileIDs);
return unmodifiableFileIDS;
}
final public GroupKey<?> groupKey;