Using weak referencing to gc listeners.
This is related to a problem I described in another posting (see the link given below). I am trying to use weak referencing to enable java to garbage collect actionListeners which are no longer being used but were no unregistered before removing the component that they were registered to. Could someone provide an example of how to do this? I have tried using WeakHashMaps, without success because I am new to Java. I would appreciate any help on this.