[vlc-devel] commit: atmo: fix mismatch allocation/deallocation. ( Rémi Duraffort )

git version control git at videolan.org
Tue Jan 26 22:55:54 CET 2010


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Tue Jan 26 22:27:37 2010 +0100| [f741dd1b7e5499c311bb0e91569e5d8f44835778] | committer: Rémi Duraffort 

atmo: fix mismatch allocation/deallocation.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f741dd1b7e5499c311bb0e91569e5d8f44835778
---

 modules/video_filter/atmo/AtmoCalculations.cpp |   44 ++++++++++++------------
 1 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/modules/video_filter/atmo/AtmoCalculations.cpp b/modules/video_filter/atmo/AtmoCalculations.cpp
index 23f5fc6..1f738ab 100644
--- a/modules/video_filter/atmo/AtmoCalculations.cpp
+++ b/modules/video_filter/atmo/AtmoCalculations.cpp
@@ -54,17 +54,17 @@ CAtmoColorCalculator::CAtmoColorCalculator(CAtmoConfig *pAtmoConfig)
 
 CAtmoColorCalculator::~CAtmoColorCalculator(void)
 {
-  delete m_Weight;
-  delete m_hue_hist;
-  delete m_windowed_hue_hist;
-  delete m_most_used_hue_last;
-  delete m_most_used_hue;
-  delete m_sat_hist;
-  delete m_windowed_sat_hist;
-  delete m_most_used_sat;
-  delete m_Zone_Weights;
-  delete m_average_v;
-  delete m_average_counter;
+  delete[] m_Weight;
+  delete[] m_hue_hist;
+  delete[] m_windowed_hue_hist;
+  delete[] m_most_used_hue_last;
+  delete[] m_most_used_hue;
+  delete[] m_sat_hist;
+  delete[] m_windowed_sat_hist;
+  delete[] m_most_used_sat;
+  delete[] m_Zone_Weights;
+  delete[] m_average_v;
+  delete[] m_average_counter;
 }
 
 void CAtmoColorCalculator::UpdateParameters()
@@ -114,17 +114,17 @@ pColorPacket CAtmoColorCalculator::AnalyzeHSV(tHSVColor *HSV_Img)
 
   if(AtmoSetup_NumZones != m_LastNumZones)
   {
-     delete m_Weight;
-     delete m_hue_hist;
-     delete m_windowed_hue_hist;
-     delete m_most_used_hue_last;
-     delete m_most_used_hue;
-     delete m_sat_hist;
-     delete m_windowed_sat_hist;
-     delete m_most_used_sat;
-     delete m_Zone_Weights;
-     delete m_average_v;
-     delete m_average_counter;
+     delete[] m_Weight;
+     delete[] m_hue_hist;
+     delete[] m_windowed_hue_hist;
+     delete[] m_most_used_hue_last;
+     delete[] m_most_used_hue;
+     delete[] m_sat_hist;
+     delete[] m_windowed_sat_hist;
+     delete[] m_most_used_sat;
+     delete[] m_Zone_Weights;
+     delete[] m_average_v;
+     delete[] m_average_counter;
 
      m_Weight              = new int[AtmoSetup_NumZones * IMAGE_SIZE];
      m_Zone_Weights        = new int*[AtmoSetup_NumZones];




More information about the vlc-devel mailing list