Interface DisposeNotifier

  • All Known Implementing Classes:
    java_remote_bridge

    public interface DisposeNotifier
    Optional interface to be implemented by objects stored in a WeakMap.
    See Also:
    WeakMap
    • Method Detail

      • addDisposeListener

        void addDisposeListener​(DisposeListener listener)
        Adds a dispose listener, to be notified when this object is disposed.

        It is unspecified what happens when the same listener is added multiple times.

        It is unspecified exactly when the notifyDispose callback is fired: immediately before the notifier is disposed, while it is in the process of disposing, or some time after it got disposed. But even if adding a listener to an already disposed notifier, the listener must eventually receive a notifyDispose callback.

        Parameters:
        listener - a dispose listener, to be notified when this object is disposed; must not be null