fix for more new[]/delete[] mismatches

This commit is contained in:
Campbell Barton
2012-07-22 15:31:12 +00:00
parent f9ed34cce9
commit e646803441
3 changed files with 6 additions and 9 deletions

View File

@@ -384,7 +384,7 @@ void DilateStepOperation::deinitExecution()
this->m_inputProgram = NULL;
this->deinitMutex();
if (this->m_cached_buffer) {
delete this->m_cached_buffer;
delete [] this->m_cached_buffer;
this->m_cached_buffer = NULL;
}
}

View File

@@ -1273,8 +1273,8 @@ void *DoubleEdgeMaskOperation::initializeTileData(rcti *rect)
float *imask = innerMask->convertToValueBuffer();
float *omask = outerMask->convertToValueBuffer();
doDoubleEdgeMask(imask, omask, data);
delete imask;
delete omask;
delete [] imask;
delete [] omask;
this->m_cachedInstance = data;
}
unlockMutex();
@@ -1282,12 +1282,9 @@ void *DoubleEdgeMaskOperation::initializeTileData(rcti *rect)
}
void DoubleEdgeMaskOperation::executePixel(float *color, int x, int y, void *data)
{
float *buffer = (float *) data;
float *buffer = (float *)data;
int index = (y * this->getWidth() + x);
color[0] = buffer[index];
color[1] = buffer[index + 1];
color[2] = buffer[index + 2];
color[3] = buffer[index + 3];
copy_v4_v4(color, buffer + index);
}
void DoubleEdgeMaskOperation::deinitExecution()

View File

@@ -115,6 +115,6 @@ void VectorBlurOperation::generateVectorBlur(float *data, MemoryBuffer *inputIma
blurdata.curved = this->m_settings->curved;
blurdata.fac = this->m_settings->fac;
RE_zbuf_accumulate_vecblur(&blurdata, this->getWidth(), this->getHeight(), data, inputImage->getBuffer(), inputSpeed->getBuffer(), zbuf);
delete zbuf;
delete [] zbuf;
return;
}