mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
Client memory need - Removed some unneeded references.
This commit is contained in:
parent
67e25d43bd
commit
6646aaf5b2
3 changed files with 19 additions and 6 deletions
|
|
@ -36,7 +36,6 @@ import mage.constants.ColoredManaSymbol;
|
|||
import mage.constants.Rarity;
|
||||
import mage.interfaces.rate.RateCallback;
|
||||
import mage.utils.DeckBuilder;
|
||||
import mage.view.TournamentTypeView;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -156,16 +155,28 @@ public class DeckGenerator {
|
|||
tmp.createNewFile();
|
||||
deck.setName("Generated-Deck-" + UUID.randomUUID());
|
||||
Sets.saveDeck(tmp.getAbsolutePath(), deck.getDeckCardLists());
|
||||
deck = null;
|
||||
//JOptionPane.showMessageDialog(null, "Deck has been generated.");
|
||||
DeckGenerator.cleanUp(btnGenerate, btnCancel);
|
||||
return tmp.getAbsolutePath();
|
||||
} catch (Exception e) {
|
||||
JOptionPane.showMessageDialog(null, "Couldn't generate deck. Try once again.");
|
||||
JOptionPane.showMessageDialog(null, "Couldn't generate deck. Try again.");
|
||||
}
|
||||
}
|
||||
|
||||
DeckGenerator.cleanUp(btnGenerate, btnCancel);
|
||||
return selectedColors;
|
||||
}
|
||||
|
||||
private static void cleanUp(JButton btnGenerate, JButton btnCancel) {
|
||||
for (ActionListener al: btnGenerate.getActionListeners()) {
|
||||
btnGenerate.removeActionListener(al);
|
||||
}
|
||||
for (ActionListener al: btnCancel.getActionListeners()) {
|
||||
btnCancel.removeActionListener(al);
|
||||
}
|
||||
deck = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates card pool
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ import mage.client.util.Config;
|
|||
*/
|
||||
public class NewPlayerPanel extends javax.swing.JPanel {
|
||||
|
||||
private JFileChooser fcSelectDeck;
|
||||
private final JFileChooser fcSelectDeck;
|
||||
|
||||
/** Creates new form NewPlayerPanel */
|
||||
public NewPlayerPanel() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue