From 21a10dba28f6abc2659929ce8bbaf0e0fd32d3f5 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Thu, 16 Jul 2009 14:58:34 +0200 Subject: Phonon: fixed a big memory leak on Windows If you had deleted a VideoWidget, it could not free the memory taken because we still had a reference on it. Task-number: 258202 --- src/3rdparty/phonon/ds9/backendnode.cpp | 2 ++ src/3rdparty/phonon/ds9/qpin.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/3rdparty/phonon/ds9/backendnode.cpp b/src/3rdparty/phonon/ds9/backendnode.cpp index 7e0b3cd..855357a 100644 --- a/src/3rdparty/phonon/ds9/backendnode.cpp +++ b/src/3rdparty/phonon/ds9/backendnode.cpp @@ -57,6 +57,8 @@ namespace Phonon BackendNode::~BackendNode() { + //this will remove the filter from the graph + mediaObjectDestroyed(); } void BackendNode::setMediaObject(MediaObject *mo) diff --git a/src/3rdparty/phonon/ds9/qpin.cpp b/src/3rdparty/phonon/ds9/qpin.cpp index 37fe48d..f652502 100644 --- a/src/3rdparty/phonon/ds9/qpin.cpp +++ b/src/3rdparty/phonon/ds9/qpin.cpp @@ -456,8 +456,8 @@ namespace Phonon HRESULT QPin::checkOutputMediaTypesConnection(IPin *pin) { - IEnumMediaTypes *emt = 0; - HRESULT hr = pin->EnumMediaTypes(&emt); + ComPointer emt; + HRESULT hr = pin->EnumMediaTypes(emt.pparam()); if (hr != S_OK) { return hr; } -- cgit v0.12