<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Comment Feed for Channel 9 - Eric Lippert - What do you think of managed code?</title>
	<atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Blogs/TheChannel9Team/Eric-Lippert-What-do-you-think-of-managed-code/RSS"></atom:link>
	<image>
		<url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url>
		<title>Channel 9 - Eric Lippert - What do you think of managed code?</title>
		<link></link>
	</image>
	<description>Hear Eric Lippert, software design engineer here at Microsoft (we know him as the &amp;quot;scripting guy&amp;quot; because he wrote VBScript and JScript technologies) talk about .NET code.</description>
	<link></link>
	<language>en</language>
	<pubDate>Wed, 19 Jun 2013 14:39:34 GMT</pubDate>
	<lastBuildDate>Wed, 19 Jun 2013 14:39:34 GMT</lastBuildDate>
	<generator>Rev9</generator>
	<item>
		<title>Re: Eric Lippert - What do you think of managed code?</title>
		<description>
			<![CDATA[This is the kind of thing you want to point everyone too. Well done for getting Eric to open up about this. Love the talk about eliminating whole classes of bugs. For all the issues people do have with C#, garbage collection, etc, it solves a very real
 problem and makes real developers really productive.<br>
<p>posted by Jeremy W</p>]]>
		</description>
		<link>http://channel9.msdn.com/Blogs/TheChannel9Team/Eric-Lippert-What-do-you-think-of-managed-code#c632168638810000000</link>
		<pubDate>Tue, 06 Apr 2004 15:58:01 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Blogs/TheChannel9Team/Eric-Lippert-What-do-you-think-of-managed-code#c632168638810000000</guid>
		<dc:creator>Jeremy W</dc:creator>
	</item>
	<item>
		<title>Re: Eric Lippert - What do you think of managed code?</title>
		<description>
			<![CDATA[
<p>What is your strategy for dealing with lapsed listeners?<br>
<br>
Are your event publishers always shorter lived than the listeners, so you don't have to deal with them? Do you not use events (or delegates)? Do you unsubscribe in dispose?<br>
<br>
Or when you say that you haven't debugged a memory leak in C# do you simply mean what you say? Not implying that you don't have memory leaks, just simply stating that you haven't debugged them..?<br>
<br>
John.<br>
</p>
<p>posted by jj5</p>]]>
		</description>
		<link>http://channel9.msdn.com/Blogs/TheChannel9Team/Eric-Lippert-What-do-you-think-of-managed-code#c632168698720000000</link>
		<pubDate>Tue, 06 Apr 2004 17:37:52 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Blogs/TheChannel9Team/Eric-Lippert-What-do-you-think-of-managed-code#c632168698720000000</guid>
		<dc:creator>jj5</dc:creator>
	</item>
	<item>
		<title>Re: Eric Lippert - What do you think of managed code?</title>
		<description>
			<![CDATA[
<blockquote>
<div>jj5 wrote:</div>
<div>
<p>Or when you say that you haven't debugged a memory leak in C# do you simply mean what you say? Not implying that you don't have memory leaks, just simply stating that you haven't debugged them..?<br>
<br>
</p>
</div>
</blockquote>
<br>
<br>
In C#, you don't do manual allocation of memory.&nbsp; You don't keep manual track of object references.&nbsp; I.e., you don't even have to allocate an object to handle a reference, or call AddRef or Release.&nbsp; It's very much like VB in that regard, for better or for
 worse.<br>
<br>
If the .NET subsystem takes care of all that stuff for you, you aren't given the opportunity to screw it up.<br>
<br>
Of course, if .NET were to screw it up, we'd be in a world of hurt.&nbsp; <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-5.gif' alt='Wink' /><br>
<br>
The downside is that some .NET APIs are just slow.&nbsp; Take the Bitmap methods &quot;GetPixel&quot; and &quot;SetPixel&quot;.&nbsp; Each call locks and unlocks some memory, which is an expensive operation.&nbsp; If you're changing or setting the pixels of a image one by one (in my case, grayscaling
 the image), you're hurting.&nbsp; So you have to use &quot;unsafe&quot; code, which gives you access to real memory pointers.&nbsp; Here, you have enough rope to shoot yourself in the foot, but at least you can do it quickly.&nbsp; You can operate on a whole region of memory by locking
 and unlocking once.<br>
<p>posted by object88</p>]]>
		</description>
		<link>http://channel9.msdn.com/Blogs/TheChannel9Team/Eric-Lippert-What-do-you-think-of-managed-code#c632169651810000000</link>
		<pubDate>Wed, 07 Apr 2004 20:06:21 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Blogs/TheChannel9Team/Eric-Lippert-What-do-you-think-of-managed-code#c632169651810000000</guid>
		<dc:creator>object88</dc:creator>
	</item>
	<item>
		<title>Re: Eric Lippert - What do you think of managed code?</title>
		<description>
			<![CDATA[
<blockquote>
<div>object88 wrote:</div>
<div><br>
Take the Bitmap methods &quot;GetPixel&quot; and &quot;SetPixel&quot;.&nbsp; Each call locks and unlocks some memory, which is an expensive operation.</div>
</blockquote>
<br>
<br>
Off topic, but I couldn't let it pass. In this particular case, that's not what's happening, IIUC.<br>
<br>
GetPixel/SetPixel are GDI&#43; operations on the Bitmap object. They are handled by the unmanaged GDI&#43; code, which will (usually?) pass the operation off to your graphics driver. Your graphics driver is, of course, running in kernel mode, so user-&gt;kernel-&gt;user
 context switches are required <b>for each call</b>!<br>
<br>
This is the same when using GDI&#43; from unmanaged C&#43;&#43;, and was also the case using old GDI as well. Get/SetPixel is horrifically slow.<br>
<br>
Oh, and the lapsed listeners problem is an interesting one. Conceptually similar (to me) to circular references in COM.<br>
<p>posted by swythan</p>]]>
		</description>
		<link>http://channel9.msdn.com/Blogs/TheChannel9Team/Eric-Lippert-What-do-you-think-of-managed-code#c632170189000000000</link>
		<pubDate>Thu, 08 Apr 2004 11:01:40 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Blogs/TheChannel9Team/Eric-Lippert-What-do-you-think-of-managed-code#c632170189000000000</guid>
		<dc:creator>swythan</dc:creator>
	</item>
	<item>
		<title>Re: Eric Lippert - What do you think of managed code?</title>
		<description>
			<![CDATA[Ah, what was I thinking?&nbsp; I completely forgot that those calls were just GDI&#43; wrappers.<br>
<br>
But the fact remains that there aren't fast managed code operations for manipulating bunches of pixels.&nbsp; You have to get to pointers, which is &quot;unsafe&quot;.&nbsp; And, of course, once you get your pointers back, you have the chance to overrun&nbsp;all sorts of memory (speaking
 from expirience again).<br>
<br>
So, the performance hit isn't because the code is managed, but rather because there isn't managed code that does the job well.<br>
<br>
(Either that, or I'm completely lost regarding the meaning of managed code.&nbsp; In which case, please someone put me out of my misery.)<br>
<p>posted by object88</p>]]>
		</description>
		<link>http://channel9.msdn.com/Blogs/TheChannel9Team/Eric-Lippert-What-do-you-think-of-managed-code#c632170435730000000</link>
		<pubDate>Thu, 08 Apr 2004 17:52:53 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Blogs/TheChannel9Team/Eric-Lippert-What-do-you-think-of-managed-code#c632170435730000000</guid>
		<dc:creator>object88</dc:creator>
	</item>
	<item>
		<title>Re: Eric Lippert - What do you think of managed code?</title>
		<description>
			<![CDATA[Beginnin Bump of Topic---Bump of Topic Complete<br>
<p>posted by Jizg</p>]]>
		</description>
		<link>http://channel9.msdn.com/Blogs/TheChannel9Team/Eric-Lippert-What-do-you-think-of-managed-code#c632443802950000000</link>
		<pubDate>Sat, 19 Feb 2005 03:24:55 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Blogs/TheChannel9Team/Eric-Lippert-What-do-you-think-of-managed-code#c632443802950000000</guid>
		<dc:creator>Jizg</dc:creator>
	</item>
	<item>
		<title>Re: Eric Lippert - What do you think of managed code?</title>
		<description>
			<![CDATA[
<p>I have to agree that .net API's are a little slow. I am using them on my site <a href="http://www.cool-science-fair-experiments.com">
cool science fair experiments</a> and they seem to drag some with high bandwith usage.</p>
<p>posted by Science Fair</p>]]>
		</description>
		<link>http://channel9.msdn.com/Blogs/TheChannel9Team/Eric-Lippert-What-do-you-think-of-managed-code#c634118487380000000</link>
		<pubDate>Fri, 11 Jun 2010 10:25:38 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Blogs/TheChannel9Team/Eric-Lippert-What-do-you-think-of-managed-code#c634118487380000000</guid>
		<dc:creator>Science Fair</dc:creator>
	</item>
</channel>
</rss>