Some changes to prevent memory leaks from gamePane (not fiished yet).

This commit is contained in:
LevelX2 2014-01-30 17:35:12 +01:00
parent f32b28abcc
commit da2dc4cd5a
5 changed files with 51 additions and 22 deletions

View file

@ -34,10 +34,13 @@
package mage.client.game;
import java.beans.PropertyVetoException;
import mage.client.*;
import javax.swing.*;
import java.util.UUID;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
@ -65,7 +68,13 @@ public class GamePane extends MagePane {
}
public void hideGame() {
gamePanel.hideGame();
try {
gamePanel.hideGame();
this.setClosed(true);
} catch (PropertyVetoException ex) {
Logger.getLogger(GamePane.class.getName()).log(Level.SEVERE, "GamePane could not be closed", ex);
this.dispose();
}
}
public void watchGame(UUID gameId) {