1. Britton Smith
  2. enzo-dev-coolingtime-rh

Commits

Britton Smith  committed a870043

Fixing memory leak.

  • Participants
  • Parent commits 9f08e5d
  • Branches week-of-code

Comments (0)

Files changed (1)

File src/enzo/Grid_SolveHydroEquations.C

View file
 	ENZO_FAIL("Error in grid->ComputeGammaField.");
       }
     } else {
-      GammaField = new float;
+      GammaField = new float[1];
       GammaField[0] = Gamma;
 
     }
 
     /* Clean up allocated fields. */
 
+    delete [] GammaField;   
 
     for (dim = 0; dim < MAX_DIMENSION; dim++)
       delete [] CellWidthTemp[dim];