forked from bartvdbraak/blender
correct freeing C++ arrays.
This commit is contained in:
parent
51d9bf725d
commit
9c504f6db2
@ -511,7 +511,7 @@ void WTURBULENCE::computeEnergy(float *_energy, float* xvel, float* yvel, float*
|
|||||||
if (obstacles[index])
|
if (obstacles[index])
|
||||||
obstacles[index] = 1; // DG TODO ? animated obstacle flag?
|
obstacles[index] = 1; // DG TODO ? animated obstacle flag?
|
||||||
|
|
||||||
free(obstacles);
|
delete [] obstacles;
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -61,7 +61,7 @@ void ConvolutionFilterOperation::deinitExecution()
|
|||||||
this->inputOperation = NULL;
|
this->inputOperation = NULL;
|
||||||
this->inputValueOperation = NULL;
|
this->inputValueOperation = NULL;
|
||||||
if (this->filter) {
|
if (this->filter) {
|
||||||
delete this->filter;
|
delete [] this->filter;
|
||||||
this->filter = NULL;
|
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_createEdgeLocationBuffer(t,rw,lres,res,gbuf,&innerEdgeOffset,&outerEdgeOffset,isz,gsz);
|
||||||
do_fillGradientBuffer(rw,res,gbuf,isz,osz,gsz,innerEdgeOffset,outerEdgeOffset);
|
do_fillGradientBuffer(rw,res,gbuf,isz,osz,gsz,innerEdgeOffset,outerEdgeOffset);
|
||||||
|
|
||||||
delete gbuf; // free the gradient index buffer
|
delete [] gbuf; // free the gradient index buffer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user