[vlc-commits] qt: plugins: Fix memory leak
Hugo Beauzée-Luyssen
git at videolan.org
Tue May 16 17:41:14 CEST 2017
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon May 15 13:27:16 2017 +0200| [702f3e9f14972fe88f1c8f00c053b41117163501] | committer: Hugo Beauzée-Luyssen
qt: plugins: Fix memory leak
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=702f3e9f14972fe88f1c8f00c053b41117163501
---
modules/gui/qt/dialogs/plugins.cpp | 5 +++++
modules/gui/qt/dialogs/plugins.hpp | 1 +
2 files changed, 6 insertions(+)
diff --git a/modules/gui/qt/dialogs/plugins.cpp b/modules/gui/qt/dialogs/plugins.cpp
index 4fc1d02966..ab81ecef0e 100644
--- a/modules/gui/qt/dialogs/plugins.cpp
+++ b/modules/gui/qt/dialogs/plugins.cpp
@@ -870,6 +870,11 @@ AddonsListModel::AddonsListModel( AddonsManager *AM_, QObject *parent )
}
+AddonsListModel::~AddonsListModel()
+{
+ qDeleteAll( addons );
+}
+
void AddonsListModel::addonAdded( addon_entry_t *p_entry )
{
beginInsertRows( QModelIndex(), addons.count(), addons.count() );
diff --git a/modules/gui/qt/dialogs/plugins.hpp b/modules/gui/qt/dialogs/plugins.hpp
index 8f8c017ea7..f4cf5adf28 100644
--- a/modules/gui/qt/dialogs/plugins.hpp
+++ b/modules/gui/qt/dialogs/plugins.hpp
@@ -219,6 +219,7 @@ class AddonsListModel: public ExtensionListModel
public:
AddonsListModel( AddonsManager *AM, QObject *parent = 0 );
+ virtual ~AddonsListModel();
QVariant data( const QModelIndex& index, int role ) const Q_DECL_OVERRIDE;
QModelIndex index( int row, int column = 0,
const QModelIndex& = QModelIndex() ) const Q_DECL_OVERRIDE;
More information about the vlc-commits
mailing list