<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Delegates, events, and garbage</title><link>http://blogs.msdn.com/shawnhar/archive/2007/07/09/delegates-events-and-garbage.aspx</link><description>Some commenters on my previous post asked for more information about the situations where delegates allocate memory. Here's the scoop. There are actually three reasons why careless use of delegates or events can cause memory allocations: Allocating delegate</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Delegates, events, and garbage</title><link>http://blogs.msdn.com/shawnhar/archive/2007/07/09/delegates-events-and-garbage.aspx#3790960</link><pubDate>Tue, 10 Jul 2007 05:54:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3790960</guid><dc:creator>snprbob86</dc:creator><description>&lt;p&gt;RE: Allocating EventArgs...&lt;/p&gt;
&lt;p&gt;Isn't this why &amp;nbsp;EventArgs.Empty exists?&lt;/p&gt;
&lt;p&gt;-Brandon Bloom&lt;/p&gt;
</description></item><item><title>re: Delegates, events, and garbage</title><link>http://blogs.msdn.com/shawnhar/archive/2007/07/09/delegates-events-and-garbage.aspx#3800073</link><pubDate>Tue, 10 Jul 2007 18:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3800073</guid><dc:creator>ShawnHargreaves</dc:creator><description>&lt;p&gt;EventArgs.Empty is good if you have no arguments to pass, but won't help if you do actually have a custom argument type and want to put some real data in there. I don't have a good feeling for how many events have no args, but it's maybe 50/50?&lt;/p&gt;
</description></item><item><title>re: Delegates, events, and garbage</title><link>http://blogs.msdn.com/shawnhar/archive/2007/07/09/delegates-events-and-garbage.aspx#3815899</link><pubDate>Wed, 11 Jul 2007 17:46:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3815899</guid><dc:creator>andyl</dc:creator><description>&lt;p&gt;Thanks for elaborating on the event/delegate issue - passing structs by reference is working fine for me, and will do until XNA supports a generational GC (come on Shawn, you *know* you need one! ;)&lt;/p&gt;
</description></item></channel></rss>