I would like a little info that I can't figure out from what I have been reading on GC.
If I have a JTabbedPane with 4 Tabs, and on tab #4 I have a JPanel with different SWING objects placed on the JPanel, if I call dispose() on the JPanel when removing that Tab #4 from the JTabbedPane, will it and all the objects that are contained within that JPanel be GC'd? Do I need to dispose() the Tab itself or is removing it sufficient?
How do I ensure that when I remove the Tab the JPanel and it's objects get GC'd?
BTW - I have a class that extends JPanel. And all it's objects are contained in that class.
If I have a JTabbedPane with 4 Tabs, and on tab #4 I have a JPanel with different SWING objects placed on the JPanel, if I call dispose() on the JPanel when removing that Tab #4 from the JTabbedPane, will it and all the objects that are contained within that JPanel be GC'd? Do I need to dispose() the Tab itself or is removing it sufficient?
How do I ensure that when I remove the Tab the JPanel and it's objects get GC'd?
BTW - I have a class that extends JPanel. And all it's objects are contained in that class.