ca.odell.glazedlists

Interface DisposableMap<K,V>

All Superinterfaces:
Map

public interface DisposableMap<K,V>
extends Map

A special kind of Map backed by an EventList that is expected to live longer than this Map. It defines a dispose() method which should be called when the Map is no longer useful, but the underlying EventList is still referenced and useful. It allows this Map to be garbage collected before its source EventList.
Author:
James Lemieux

Method Summary

void
dispose()
Releases the resources consumed by this DisposableMap so that it may eventually be garbage collected.

Method Details

dispose

public void dispose()
Releases the resources consumed by this DisposableMap so that it may eventually be garbage collected.

A DisposableMap will be garbage collected without a call to dispose(), but not before its source EventList is garbage collected. By calling dispose(), you allow the DisposableMap to be garbage collected before its source EventList. This is necessary for situations where a DisposableMap is short-lived but its source EventList is long-lived.

Warning: It is an error to call any method on a DisposableMap after it has been disposed.


Glazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by pbuilder at 2009-07-14 22:05