I have a container containing JComponents
like JButton
or JSlider
having listeners (onClick, onValueChanged...). Sometimes the containers content is removed with container.removeAll()
and refilled with JComponents
. The listeners of the components contain references to persistent object instances.
My question is now, does the GC
cleanup the listeners of the old components, that were removed?