[vlmc-devel] commit: MediaContainer: Really delete the contained clip when destroying the mediacontainer ( Hugo Beauzee-Luyssen )
git at videolan.org
git at videolan.org
Tue Mar 16 02:34:10 CET 2010
vlmc | branch: master | Hugo Beauzee-Luyssen <beauze.h at gmail.com> | Tue Mar 16 02:27:55 2010 +0100| [42f31d88170ce557253fc69a20bc08eb77517d6f] | committer: Hugo Beauzee-Luyssen
MediaContainer: Really delete the contained clip when destroying the mediacontainer
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=42f31d88170ce557253fc69a20bc08eb77517d6f
---
src/Library/MediaContainer.cpp | 7 +++++++
src/Library/MediaContainer.h | 1 +
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/Library/MediaContainer.cpp b/src/Library/MediaContainer.cpp
index 004fae7..a3755cf 100644
--- a/src/Library/MediaContainer.cpp
+++ b/src/Library/MediaContainer.cpp
@@ -35,6 +35,13 @@ MediaContainer::MediaContainer( Clip* parent /*= NULL*/ ) : m_parent( parent )
{
}
+MediaContainer::~MediaContainer()
+{
+ foreach ( Clip* c, m_clips.values() )
+ delete c;
+ m_clips.clear();
+}
+
Clip*
MediaContainer::clip( const QUuid& uuid )
{
diff --git a/src/Library/MediaContainer.h b/src/Library/MediaContainer.h
index 0186f94..d146573 100644
--- a/src/Library/MediaContainer.h
+++ b/src/Library/MediaContainer.h
@@ -39,6 +39,7 @@ class MediaContainer : public QObject
public:
MediaContainer( Clip* parent = NULL );
+ ~MediaContainer();
/**
* \brief returns the clip that match the unique identifier
* \param uuid the unique identifier of the media
More information about the Vlmc-devel
mailing list