Skip to main content
Home Forums Silverlight Programming Programming with JavaScript Memory leak issue when opening silverlight in a popup IE window
4 replies. Latest Post by Oded Zadok on October 21, 2009.
(0)
Aaadi
Member
40 points
33 Posts
08-07-2009 8:59 AM |
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
ken tucker
All-Star
16276 points
2,479 Posts
08-07-2009 1:13 PM |
What kind of a popup window are you using?
Lyynx
79 points
29 Posts
08-07-2009 1:39 PM |
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
08-08-2009 2:28 AM |
Actually i m using BLOCKED SCRIPT Window.Open('player.aspx'), to open aspx page that host silverlight xap of player.
Oded Zadok
6 points
4 Posts
10-21-2009 6:04 AM |
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.