[vlmc-devel] Use delete[]

Yikai Lu git at videolan.org
Sat Apr 2 11:39:21 CEST 2016


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Sat Apr  2 14:45:05 2016 +0900| [e10e8a0ae5c149cc8d82649d0a7a905c13c2e9e9] | committer: Hugo Beauzée-Luyssen

Use delete[]

Since buff is created by new uchar[], delete[] should be used to delete it completely.

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> https://code.videolan.org/videolan/vlmc/commit/e10e8a0ae5c149cc8d82649d0a7a905c13c2e9e9
---

 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 1eb2698..a9c1632 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;
     }
 }



More information about the Vlmc-devel mailing list