Source Code - Memory Leak Question

Topics: Bugs
Jun 1, 2011 at 1:04 PM

Looking back at the changes for this check in, it says the major memory leak was fixed, but when was this leak introduced?  Is it in the 1.o RTM version?




Jun 1, 2011 at 1:27 PM

It would have been there since the beginning. However, it may have only been happening for WP7 and/or in rare cases. I never had reports of a leak related to this on any other platform. So, it could be a WP7 implementation detail. The fix was very simple, but hard to find. Basically, action message was holding a reference to EventArgs as part of the ActionExecutionContext. In some cases the EventArgs would have a reference to it's source which would be a control. This created a strong reference link from the action back to an arbitrary control in the UI, thus a memory leak could occur. I fixed it by nulling out the EventArgs property after the action executed.

Sep 12, 2011 at 2:30 AM

Hi Rob

Thought you might be interested that this changeset has fixed a leak I have been looking for in a SL 4.0 application.

Let me know if you want more details...