Media Foundation: another way to call IMFActivate::ShutdownObject?

Posted by KenC on Stack Overflow See other posts from Stack Overflow or by KenC
Published on 2009-09-13T06:31:24Z Indexed on 2010/05/22 7:50 UTC
Read the original article Hit count: 353

Hi,

Here is a question about IMFActivate::ActivateObject and IMFActivate::ShutdownObject in Media Foundation.

According to MSDN, the component that calls ActivateObject is responsible for calling ShutdownObject.

But there are two examples not following this rule:

http://msdn.microsoft.com/en-us/library/dd388503%28VS.85%29.aspx

and

http://msdn.microsoft.com/en-us/library/dd317912%28VS.85%29.aspx

In these two examples, they call ActivateObject and then release IMFActivate interface without calling ShutdownObject method.

This is going to lead to memory leaking, right? Or there is another way to release the resource occupied by the object?

(Can I use IMFMediaSource::Shutdown to release the object instead of using IMFActivate::ShutdownObject)

Thanks in advance.

© Stack Overflow or respective owner

Related posts about directshow

Related posts about com