correct freeing C++ arrays.

This commit is contained in:
Campbell Barton 2012-06-10 20:14:15 +00:00
parent 51d9bf725d
commit 9c504f6db2
3 changed files with 3 additions and 3 deletions

@ -511,7 +511,7 @@ void WTURBULENCE::computeEnergy(float *_energy, float* xvel, float* yvel, float*
if (obstacles[index])
obstacles[index] = 1; // DG TODO ? animated obstacle flag?
free(obstacles);
delete [] obstacles;
}
//////////////////////////////////////////////////////////////////////////////////////////

@ -61,7 +61,7 @@ void ConvolutionFilterOperation::deinitExecution()
this->inputOperation = NULL;
this->inputValueOperation = NULL;
if (this->filter) {
delete this->filter;
delete [] this->filter;
this->filter = NULL;
}
}

@ -1220,7 +1220,7 @@ void DoubleEdgeMaskOperation::doDoubleEdgeMask(float *imask, float *omask, float
do_createEdgeLocationBuffer(t,rw,lres,res,gbuf,&innerEdgeOffset,&outerEdgeOffset,isz,gsz);
do_fillGradientBuffer(rw,res,gbuf,isz,osz,gsz,innerEdgeOffset,outerEdgeOffset);
delete gbuf; // free the gradient index buffer
delete [] gbuf; // free the gradient index buffer
}
}