TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
pankaj Garg
NA
1
17.9k
Memory Leaks in Window Media Player + c#
Feb 10 2011 3:08 AM
Hi
I am facing some memory leaks in windowmediaplayer after disposing it.
Following is the code
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
AxWMPLib.AxWindowsMediaPlayer m = new AxWMPLib.AxWindowsMediaPlayer();
private void start_Click(object sender, EventArgs e)
{
this.Controls.Add(m);
m.Location = new System.Drawing.Point(1, 1);
m.Height = 130;
m.Width = 150;
m.URL = @"C:\Users\Public\Videos\Sample Videos\Bear.wmv";
}
private void stop_Click(object sender, EventArgs e)
{
m.URL = null;
m.close();
m.Dispose();
}
}
On clicking stop, it is still keeping the following in the memory
System.Windows.Forms.AxHost.ConnectionPointCookie
AxWMPLib.AxWindowsMediaPlayerEventMulticaster
Please Help
Thanks
Reply
Answers (
2
)
IDictionary
get(string ticker, string type, DateTime from, DateTime To);
Regarding C# syntax