<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments for .NET and Memory</title>
	<atom:link href="http://www.scitech.se/blog/index.php/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scitech.se/blog</link>
	<description>Information and comments about .NET, memory profiling and development in general&#60;br&#62;by Andreas Suurkuusk, co-founder of SciTech Software AB</description>
	<pubDate>Fri, 30 Jul 2010 14:52:51 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Minor memory leak introduced in .NET Framework 2.0 SP1 by Richard</title>
		<link>http://www.scitech.se/blog/index.php/2008/03/20/minor-memory-leak-introduced-in-net-framework-20-sp1/comment-page-1/#comment-28475</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Fri, 12 Feb 2010 12:50:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scitech.se/blog/index.php/2008/03/20/minor-memory-leak-introduced-in-net-framework-20-sp1/#comment-28475</guid>
		<description>Thanks for the pointer - solved an issue for me today.</description>
		<content:encoded><![CDATA[<p>Thanks for the pointer - solved an issue for me today.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Memory Leak in ToolStripTextBoxControl by Arunprasad</title>
		<link>http://www.scitech.se/blog/index.php/2007/10/05/memory-leak-in-toolstriptextboxcontrol/comment-page-1/#comment-25140</link>
		<dc:creator>Arunprasad</dc:creator>
		<pubDate>Thu, 23 Jul 2009 16:43:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.scitech.se/blog/index.php/2007/10/05/memory-leak-in-toolstriptextboxcontrol/#comment-25140</guid>
		<description>We are noticing memory leaks in the Web Forms version of the Microsoft ReportViewer control. However, we don't have the Web Forms equivalent of the DisposeHelper class that you have implemented here. 

Any suggestion / help would be great..</description>
		<content:encoded><![CDATA[<p>We are noticing memory leaks in the Web Forms version of the Microsoft ReportViewer control. However, we don&#8217;t have the Web Forms equivalent of the DisposeHelper class that you have implemented here. </p>
<p>Any suggestion / help would be great..</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Memory Leak in ToolStripTextBoxControl by Keith</title>
		<link>http://www.scitech.se/blog/index.php/2007/10/05/memory-leak-in-toolstriptextboxcontrol/comment-page-1/#comment-24714</link>
		<dc:creator>Keith</dc:creator>
		<pubDate>Fri, 01 May 2009 17:33:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.scitech.se/blog/index.php/2007/10/05/memory-leak-in-toolstriptextboxcontrol/#comment-24714</guid>
		<description>Microsoft reports this as being fixed on Microsoft Connect (#305199). The problem report was closed 2009/02/03 (it was reported on 2007/10/17).</description>
		<content:encoded><![CDATA[<p>Microsoft reports this as being fixed on Microsoft Connect (#305199). The problem report was closed 2009/02/03 (it was reported on 2007/10/17).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Memory Leak in ToolStripTextBoxControl by Form not disposing due to lingering reference &#124; keyongtech</title>
		<link>http://www.scitech.se/blog/index.php/2007/10/05/memory-leak-in-toolstriptextboxcontrol/comment-page-1/#comment-21352</link>
		<dc:creator>Form not disposing due to lingering reference &#124; keyongtech</dc:creator>
		<pubDate>Sun, 18 Jan 2009 17:20:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.scitech.se/blog/index.php/2007/10/05/memory-leak-in-toolstriptextboxcontrol/#comment-21352</guid>
		<description>[...] event handlers. The article I found describes how to do this using ToolStripTextBox as an example http://www.scitech.se/blog/index.php...extboxcontrol/  Following the steps described in the article I discovered, that my problem is caused by a [...]</description>
		<content:encoded><![CDATA[<p>[...] event handlers. The article I found describes how to do this using ToolStripTextBox as an example <a href="http://www.scitech.se/blog/index.php...extboxcontrol/" rel="nofollow">http://www.scitech.se/blog/index.php&#8230;extboxcontrol/</a>  Following the steps described in the article I discovered, that my problem is caused by a [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Memory Leak in ToolStripTextBoxControl by Daniel</title>
		<link>http://www.scitech.se/blog/index.php/2007/10/05/memory-leak-in-toolstriptextboxcontrol/comment-page-1/#comment-19418</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Tue, 18 Nov 2008 15:59:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.scitech.se/blog/index.php/2007/10/05/memory-leak-in-toolstriptextboxcontrol/#comment-19418</guid>
		<description>Hi, tody I run in the same Problem with the datagridview.

But instead of unregistering all events like in the workaround, I just Dispose the datagridviews event list with a call to dispose like that.

mDataGridView.Events.Dispose();

This works well!</description>
		<content:encoded><![CDATA[<p>Hi, tody I run in the same Problem with the datagridview.</p>
<p>But instead of unregistering all events like in the workaround, I just Dispose the datagridviews event list with a call to dispose like that.</p>
<p>mDataGridView.Events.Dispose();</p>
<p>This works well!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Memory Leak in ToolStripTextBoxControl by Oliver</title>
		<link>http://www.scitech.se/blog/index.php/2007/10/05/memory-leak-in-toolstriptextboxcontrol/comment-page-1/#comment-15514</link>
		<dc:creator>Oliver</dc:creator>
		<pubDate>Wed, 20 Aug 2008 19:13:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.scitech.se/blog/index.php/2007/10/05/memory-leak-in-toolstriptextboxcontrol/#comment-15514</guid>
		<description>You dont need to do this somewhere?

m_textBox.VisibleChanged -= new EventHandler( textBox_VisibleChanged );
m_textBox.Disposed -= new EventHandler( textBox_Disposed );

Note the " -= "
Thanks</description>
		<content:encoded><![CDATA[<p>You dont need to do this somewhere?</p>
<p>m_textBox.VisibleChanged -= new EventHandler( textBox_VisibleChanged );<br />
m_textBox.Disposed -= new EventHandler( textBox_Disposed );</p>
<p>Note the &#8221; -= &#8221;<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Memory Leak in ToolStripTextBoxControl by Roy</title>
		<link>http://www.scitech.se/blog/index.php/2007/10/05/memory-leak-in-toolstriptextboxcontrol/comment-page-1/#comment-12692</link>
		<dc:creator>Roy</dc:creator>
		<pubDate>Mon, 23 Jun 2008 03:57:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.scitech.se/blog/index.php/2007/10/05/memory-leak-in-toolstriptextboxcontrol/#comment-12692</guid>
		<description>Probs something similar to

RemoveHandler SystemEvents.UserPreferenceChanged, AddressOf eventHandler</description>
		<content:encoded><![CDATA[<p>Probs something similar to</p>
<p>RemoveHandler SystemEvents.UserPreferenceChanged, AddressOf eventHandler</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Memory Leak in ToolStripTextBoxControl by Andy smith</title>
		<link>http://www.scitech.se/blog/index.php/2007/10/05/memory-leak-in-toolstriptextboxcontrol/comment-page-1/#comment-8557</link>
		<dc:creator>Andy smith</dc:creator>
		<pubDate>Mon, 31 Mar 2008 09:24:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.scitech.se/blog/index.php/2007/10/05/memory-leak-in-toolstriptextboxcontrol/#comment-8557</guid>
		<description>This article was very useful, i'm finding that i'm having the same problem with a DataGridView and want to apply the same logic to remove the rogue Event Handlers.

The only problem I'm having is we code in VB.Net and I cannot find the equivalent for the SystemEvents.UserPreferenceChanged -= eventHandler;
 line.

Can you help.</description>
		<content:encoded><![CDATA[<p>This article was very useful, i&#8217;m finding that i&#8217;m having the same problem with a DataGridView and want to apply the same logic to remove the rogue Event Handlers.</p>
<p>The only problem I&#8217;m having is we code in VB.Net and I cannot find the equivalent for the SystemEvents.UserPreferenceChanged -= eventHandler;<br />
 line.</p>
<p>Can you help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Minor memory leak introduced in .NET Framework 2.0 SP1 by Asher</title>
		<link>http://www.scitech.se/blog/index.php/2008/03/20/minor-memory-leak-introduced-in-net-framework-20-sp1/comment-page-1/#comment-8131</link>
		<dc:creator>Asher</dc:creator>
		<pubDate>Thu, 20 Mar 2008 16:54:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.scitech.se/blog/index.php/2008/03/20/minor-memory-leak-introduced-in-net-framework-20-sp1/#comment-8131</guid>
		<description>Very nice...
don't you just love regression!</description>
		<content:encoded><![CDATA[<p>Very nice&#8230;<br />
don&#8217;t you just love regression!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Memory Leak in ToolStripTextBoxControl by andreas</title>
		<link>http://www.scitech.se/blog/index.php/2007/10/05/memory-leak-in-toolstriptextboxcontrol/comment-page-1/#comment-6562</link>
		<dc:creator>andreas</dc:creator>
		<pubDate>Sun, 10 Feb 2008 20:56:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.scitech.se/blog/index.php/2007/10/05/memory-leak-in-toolstriptextboxcontrol/#comment-6562</guid>
		<description>Everything in a root path is part of keeping an instance alive. To allow the instance to be GCed, the root path must be broken somewhere (all root paths needs to be broken). The reason for pointing out the UserPreferencesChangedEventHandler is that event handlers are very often involved when investigating a memory leak. If the event owner (producer) has a longer life-time than the listener, the event listener must be explicitly removed.

In this case, the bottom of the root path was the static field SystemEvents._handlers and a few entries up I found the event handler. Looking at the documentation reveals that the UserPreferencesChangedEventHandler is used by the static event UserPreferencesChanged. A static event lives for the whole duration of the process, so to avoid a memory leak the listener (the ToolStripTextBox) needs to removed from the event.</description>
		<content:encoded><![CDATA[<p>Everything in a root path is part of keeping an instance alive. To allow the instance to be GCed, the root path must be broken somewhere (all root paths needs to be broken). The reason for pointing out the UserPreferencesChangedEventHandler is that event handlers are very often involved when investigating a memory leak. If the event owner (producer) has a longer life-time than the listener, the event listener must be explicitly removed.</p>
<p>In this case, the bottom of the root path was the static field SystemEvents._handlers and a few entries up I found the event handler. Looking at the documentation reveals that the UserPreferencesChangedEventHandler is used by the static event UserPreferencesChanged. A static event lives for the whole duration of the process, so to avoid a memory leak the listener (the ToolStripTextBox) needs to removed from the event.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
