* Memory leaks - TornamentPane can now be removed by gc.

This commit is contained in:
LevelX2 2014-02-03 01:18:35 +01:00
parent f734d89de6
commit ae555aea0e
2 changed files with 9 additions and 1 deletions

View file

@ -55,7 +55,8 @@ public class TournamentPane extends MagePane {
} }
public void hideTournament() { public void hideTournament() {
tournamentPanel.hideTournament(); tournamentPanel.cleanUp();
removeFrame();
} }
public UUID getTournamentId() { public UUID getTournamentId() {

View file

@ -117,6 +117,13 @@ public class TournamentPanel extends javax.swing.JPanel {
} }
public void cleanUp() {
this.stopTasks();
if (this.chatPanel1 != null) {
this.chatPanel1.disconnect();
}
}
private void saveDividerLocations() { private void saveDividerLocations() {
// save panel sizes and divider locations. // save panel sizes and divider locations.
Rectangle rec = MageFrame.getDesktop().getBounds(); Rectangle rec = MageFrame.getDesktop().getBounds();