diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-16 16:32:48 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-16 16:32:48 +0400 |
commit | 3bc16fd60dd573f8289552a0046b0735d1c7e02b (patch) | |
tree | 3936a357fd922e96b622f29f04804b20cb11f234 /source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp | |
parent | 883e9df1ccdaaa847c86e2d1457fd88333b87c84 (diff) |
compositor: replace C++ new/delete with guardedalloc.
Diffstat (limited to 'source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp index d5daace059d..39665b10f48 100644 --- a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp +++ b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp @@ -1269,12 +1269,12 @@ void *DoubleEdgeMaskOperation::initializeTileData(rcti *rect) if (this->m_cachedInstance == NULL) { MemoryBuffer *innerMask = (MemoryBuffer *)this->m_inputInnerMask->initializeTileData(rect); MemoryBuffer *outerMask = (MemoryBuffer *)this->m_inputOuterMask->initializeTileData(rect); - float *data = new float[this->getWidth() * this->getHeight()]; + float *data = (float *)MEM_mallocN(sizeof(float) * this->getWidth() * this->getHeight(), __func__); float *imask = innerMask->convertToValueBuffer(); float *omask = outerMask->convertToValueBuffer(); doDoubleEdgeMask(imask, omask, data); - delete [] imask; - delete [] omask; + MEM_freeN(imask); + MEM_freeN(omask); this->m_cachedInstance = data; } unlockMutex(); @@ -1293,7 +1293,7 @@ void DoubleEdgeMaskOperation::deinitExecution() this->m_inputOuterMask = NULL; deinitMutex(); if (this->m_cachedInstance) { - delete this->m_cachedInstance; + MEM_freeN(this->m_cachedInstance); this->m_cachedInstance = NULL; } } |