Package ca.odell.glazedlists
Interface DisposableMap<K,V>
-
- All Superinterfaces:
java.util.Map<K,V>
public interface DisposableMap<K,V> extends java.util.Map<K,V>A special kind of Map backed by an EventList that is expected to live longer than this Map. It defines adispose()method which should be called when the Map is no longer useful, but the underlyingEventListis still referenced and useful. It allows this Map to be garbage collected before its sourceEventList.- Author:
- James Lemieux
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddispose()Releases the resources consumed by thisDisposableMapso that it may eventually be garbage collected.
-
-
-
Method Detail
-
dispose
void dispose()
Releases the resources consumed by thisDisposableMapso that it may eventually be garbage collected.A
DisposableMapwill be garbage collected without a call todispose(), but not before its sourceEventListis garbage collected. By callingdispose(), you allow theDisposableMapto be garbage collected before its sourceEventList. This is necessary for situations where aDisposableMapis short-lived but its sourceEventListis long-lived.Warning: It is an error to call any method on a
DisposableMapafter it has been disposed.
-
-