-
Type:
Bug
-
Resolution: Won't Fix
-
Priority:
P3
-
None
-
Affects Version/s: 1.1.5
-
Component/s: client-libs
-
generic
-
generic
Name: el35337 Date: 06/10/98
There is a memory leak in the swing-component JTable.
JTable adds itself to a TableModel in the method
public void setModel(TableModel newModel)
But it never removes itself from that model until setModel is
called again. Remember - the TableModel could itself be
referenced from other objects. After JTable is being removed
from its parent component, such a back-reference stops the
gc to collect it !!!!
So JTable has to de-register itself from its model in case it
is not shown anymore. I suggest it overrides
public void removeNotify()
and calls removeTableModelListener() from there. That way
it is insured that all references to the JTable-object are
cleared - garbage collection can occur then.
(Review ID: 32627)
======================================================================
- relates to
-
JDK-6472319 JComboBox memory leak: does not unregister itself from its model
-
- Closed
-