forked from External/mage
More changes to reduce memory leaks.
This commit is contained in:
parent
da2dc4cd5a
commit
e2c0e211ef
4 changed files with 229 additions and 149 deletions
|
|
@ -34,13 +34,10 @@
|
|||
|
||||
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;
|
||||
import javax.swing.SwingUtilities;
|
||||
import mage.client.MageFrame;
|
||||
import mage.client.MagePane;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -68,13 +65,20 @@ public class GamePane extends MagePane {
|
|||
}
|
||||
|
||||
public void 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();
|
||||
}
|
||||
// try {
|
||||
MageFrame.deactivate(this);
|
||||
MageFrame.getDesktop().remove(this);
|
||||
|
||||
gamePanel.cleanUp();
|
||||
|
||||
this.getUI().uninstallUI(this);
|
||||
this.removeAll();
|
||||
this.dispose();
|
||||
// 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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue