Skip to main content

Microsoft Silverlight

Answered Question Memory leak issue when opening silverlight in a popup IE windowRSS Feed

(0)

Aaadi
Aaadi

Member

Member

40 points

33 Posts

Memory leak issue when opening silverlight in a popup IE window

 Hi,
Currently we are facing an issue regarding popup window containing SilverLight 2 application. The problem is when we open that popup in Internet explorer (version 6,7,8)  , it hangs after opening 3 or 4 times. The Task Manager process monitor shows that whenever a popup is closed , it doesn’t free all of the memory that it consumes at the time of opening.
This issue only appears if we place our Silverlight application inside popup window. When we placed our application in Normal Page then it doesn’t make any problem while opening.Is there any type of memory leakage while opening popup.It is an IE specific problem and it doesn’t appear on any other Browser.

Thanks in advance

Adi
Software Engineer
Softech Worldwide LLC

ken tucker
ken tucker

All-Star

All-Star

16276 points

2,479 Posts

Re: Memory leak issue when opening silverlight in a popup IE window

 What kind of a popup window are you using?

Lyynx
Lyynx

Member

Member

79 points

29 Posts

Answered Question

Re: Memory leak issue when opening silverlight in a popup IE window

Hi Aaadi,

All of the memory leaks I've come across so far have been related to event handlers that have not been unhooked before the usercontrol is removed. I'm sure there are others but this might be your issue.

Where I came across it was when I had a usercontrol in a datatemplate for a list. The usercontrol had an event handler being wired up in the constructor and I assumed it would be cleaned up when the items in the list are removed and the control is cleaned up. Not so, the event handler is a strong reference and the GC won't clean up the control as it still has a reference to it.
You need to unwire the event yourself which can be tricky finding the reference to it.

Hooking up the event would be
this.Loaded += method;
and unwiring it you use this.Loaded -= method;

hope that helps,
Stephen

Aaadi
Aaadi

Member

Member

40 points

33 Posts

Re: Memory leak issue when opening silverlight in a popup IE window

Actually i m using BLOCKED SCRIPT Window.Open('player.aspx'), to open aspx page that host silverlight xap of player.

Adi
Software Engineer
Softech Worldwide LLC

Oded Zadok
Oded Zadok

Member

Member

6 points

4 Posts

Re: Memory leak issue when opening silverlight in a popup IE window

 Hi,

If you create a new Silverlight 3 application (from template) and then open the task manager. you will see the memory used for the iexplorer process is growing all the time when you refresh the browser page (pressing on F5 few times).

This is a very serious problem in case you have an ASP application that host Silverlight in a pop up window.

I didn't find any solution for this issue. 

 

Oded.

 

 

 

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities