From 8c79e0644c367120f2e6856bb23a75fb73d9f8a7 Mon Sep 17 00:00:00 2001 From: "wagic.the.homebrew" Date: Thu, 14 Jul 2011 13:49:46 +0000 Subject: [PATCH] Fix memory leak in ATransforms ability - Blame is on me for the bad design behind the "isClone" flag, I need to get rid of that flag in the long term. --- projects/mtg/include/ActionElement.h | 3 +-- projects/mtg/src/AllAbilities.cpp | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/projects/mtg/include/ActionElement.h b/projects/mtg/include/ActionElement.h index c5c33a3e4..952cc0c5e 100644 --- a/projects/mtg/include/ActionElement.h +++ b/projects/mtg/include/ActionElement.h @@ -22,9 +22,8 @@ class ActionElement: public JGuiObject { protected: int activeState; - -public: int isClone; +public: TargetChooser * tc; int currentPhase; int newPhase; diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index 9d1bc4d36..3b380081f 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -2561,7 +2561,6 @@ int ATransformer::addToGame() MTGAbility * aNew = af.parseMagicLine(newAbilitiesList[k], 0, NULL, _target); if(!aNew) continue; - aNew->isClone = 1; GenericTargetAbility * gta = dynamic_cast (aNew); if (gta) {