How do I garbage collect an application using multiple timelines and renderers

Topics: Developer Forum
Sep 14, 2016 at 4:11 PM
Edited Sep 15, 2016 at 10:36 AM
I created an application that automatically converts all audio files plus an image from a folder to video files. It also creates 4 renderers for converting 4 files at a time because I have a quad core cpu. At first, it has about 500mb of memory occupied, but after a while I get 4 then 8GB, and at some point windows runs low on memory and whats to close the app.

For timelines I use the 'using' keyword, and I am creating a renderer for each file, subscribing to the RenderCompleted event, where I cast the sender object to WindowsMediaRender (that I use) and call dispose.

It looks like the dispose call takes forever. I also tried using EndRender method as well with the same result.
Is there a way to release these render objects?