Cleanup of MediaUriElement

Dec 30, 2009 at 3:56 AM

When I add a new MediaUriElement to my WPF application, and then I Remove the element from the Window, do I need to clean up anything, i.e. calling Close() of Dispose() of some sort?

I have a fair few large video WMV files that I play and I would like to make sure that nothing gets kept around in CLR or Video memory...

Thanks,

Mark

Dec 30, 2009 at 10:13 PM
If the UnloadedBehavior is set to Close, the resources should be cleaned up in the event it's removed from the tree or the window is closed.  I think this is the default value for UnloadedBehavior.

Let me know if it doesn't work that way ;)  Been a minute since I've been in that code.

-Jer

On Tue, Dec 29, 2009 at 7:56 PM, markmacumber <notifications@codeplex.com> wrote:

From: markmacumber

When I add a new MediaUriElement to my WPF application, and then I Remove the element from the Window, do I need to clean up anything, i.e. calling Close() of Dispose() of some sort?

I have a fair few large video WMV files that I play and I would like to make sure that nothing gets kept around in CLR or Video memory...

Thanks,

Mark

Read the full discussion online.

To add a post to this discussion, reply to this email (WPFMediaKit@discussions.codeplex.com)

To start a new discussion for this project, email WPFMediaKit@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com