fixed a ton of memleaks, narrowed down the memleaks to just the computeNewCost function.

still working on a fix for this.
This commit is contained in:
zethfoxster
2016-07-04 15:13:35 -04:00
parent 2b8f1b350c
commit c018e3dcc2
5 changed files with 95 additions and 81 deletions
+1 -1
View File
@@ -251,7 +251,7 @@ int Damage::resolve()
target->lifeLostThisTurn += damage;
if ( typeOfDamage == 1 && target == source->controller()->opponent() )//add vector prowledtypes.
{
vector<string> values = MTGAllCards::getCreatureValuesById();
vector<string> values = MTGAllCards::getCreatureValuesById();//getting a weird crash here. rarely.
for (size_t i = 0; i < values.size(); ++i)
{
if ( source->hasSubtype( values[i] ) && find(source->controller()->prowledTypes.begin(), source->controller()->prowledTypes.end(), values[i])==source->controller()->prowledTypes.end() )