]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/simple_preferences.cpp
Fix memleaks: Fill in the destructor of simple preference.
[vlc] / modules / gui / qt4 / components / simple_preferences.cpp
index 776e0a58d4e2540e33be1bcc644fa99665fa1b42..4c42b43240a3e0b14ced5cff6c451fddcae4b42a 100644 (file)
@@ -568,6 +568,18 @@ void SPrefsPanel::updateAudioOptions( int number)
     optionWidgets[fileW]->setVisible( ( value == "aout_file" ) );
 }
 
+
+SPrefsPanel::~SPrefsPanel()
+{
+    QList<ConfigControl *>::Iterator conf_it;
+    for( conf_it = controls.begin() ; conf_it != controls.end() ; conf_it++ )
+    {
+        ConfigControl *c = qobject_cast<ConfigControl *>(*conf_it);
+        delete c;
+    }
+    controls.clear();
+}
+
 void SPrefsPanel::updateAudioVolume( int volume )
 {
     qobject_cast<QSpinBox *>(optionWidgets[volLW])