[vlmc-devel] [PATCH 2/2] Use delete[]
Yikai Lu
luyikei.qmltu at gmail.com
Sat Apr 2 07:45:05 CEST 2016
Since buff is created by new uchar[], delete[] should be used to delete it completely.
---
src/Workflow/AudioClipWorkflow.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Workflow/AudioClipWorkflow.cpp b/src/Workflow/AudioClipWorkflow.cpp
index 3b08877..c119c29 100644
--- a/src/Workflow/AudioClipWorkflow.cpp
+++ b/src/Workflow/AudioClipWorkflow.cpp
@@ -52,13 +52,13 @@ AudioClipWorkflow::releasePrealocated()
while ( m_availableBuffers.isEmpty() == false )
{
Workflow::AudioSample *as = m_availableBuffers.takeFirst();
- delete as->buff;
+ delete[] as->buff;
delete as;
}
while ( m_computedBuffers.isEmpty() == false )
{
Workflow::AudioSample *as = m_computedBuffers.takeFirst();
- delete as->buff;
+ delete[] as->buff;
delete as;
}
}
--
1.9.1
More information about the Vlmc-devel
mailing list