It depends on what other objects contain references to the listener, and whether the listener has a link to the component. I studied Swing code a bit and, as far as I can tell, registrars are listening to strong links to their listeners.
addMouseListener, addMouseListener(new MouseListener()...), . , , .
, - :
public class Foo implements MouseListener {
...
private Component c;
public void registerWithComponent(final Component c) {
c.addMouseListener(this);
this.c = c;
}
}
, Foo ( ), , , removeMouseListener.