Problems with leaking GDI handles

Problems with leaking GDI handles

Post by dan » Sat, 18 Nov 2006 05:47:53


Mike,

I just realized that disconnecting upstream filters from video renderer
leaks GDI objects. I think that the graph does not destroy the window
associated with the video renderer if you 'manually' disconnect the filters.

Tsviatko's solution will not leak anything but it will tie up cpu for video
decoding. I tried a combination of both (i.e. yours and Tsviatko's) but
could not get rid of the leaking.

Any thoughts?

Dan.
 
 
 

Problems with leaking GDI handles

Post by Mike Warre » Sat, 18 Nov 2006 06:47:18


In my case I keep the video window around for later use. I don't know
how you would deal with it in C++. Have you tried removing the video
window with JoinGraph(null, null)? If you then set the reference to
Null, does it allow COM the clean it up?


That's why I did it like I did. I need the smallest CPU usage I can get.

--
Mike

 
 
 

Problems with leaking GDI handles

Post by dan » Sat, 18 Nov 2006 08:17:39

That was it. I wasn't removing the video renderer from the graph. It seem
to work fine now.
Thanks again,
Dan