<?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>Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx</link><description>Sometimes they don't run at all.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#136712</link><pubDate>Fri, 21 May 2004 14:12:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:136712</guid><dc:creator>Doug</dc:creator><description>And one calls ExitThread in the middle of your code in what valid circumstances?&lt;br&gt;&lt;br&gt;This is just a variation on the KillThread problem.</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#136722</link><pubDate>Fri, 21 May 2004 14:25:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:136722</guid><dc:creator>Serge Wautier</dc:creator><description>This is the very reason why ExitThread() and their variations (_endthread(), AfxEndThread() et al) must completely be avoided IMO. Don't call them. Never. Simply exit from the thread proc.&lt;br&gt;</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#136729</link><pubDate>Fri, 21 May 2004 14:31:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:136729</guid><dc:creator>DrPizza</dc:creator><description>There seem to me few if any good reasons to ever do that; just return from the threadproc.&lt;br&gt;&lt;br&gt;I suppose that this is more of a problem if one is using pthreads; because pthreads don't directly support a return value one must (if one wishes to report a value) use pthread_exit() instead.&lt;br&gt;&lt;br&gt;Of course, since one wraps their thread functions in typesafe wrappers /anyway/ this isn't that big a deal; one writes one's threadprocs as if they could return a value, and only in the wrapper (which is a small piece of carefully controlled code) does one call the dangerous thread-terminating function.&lt;br&gt;</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#136757</link><pubDate>Fri, 21 May 2004 15:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:136757</guid><dc:creator>Ben Hutchings</dc:creator><description>pthreads includes functions or macros for registration of scoped cleanup functions which will be called on pthread_exit. Most implementations use a language-independent exception mechanism and throw an exception that can't be caught except by the internal function that calls the thread start function. So pthread_exit generally will call destructors.</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#136805</link><pubDate>Fri, 21 May 2004 16:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:136805</guid><dc:creator>Raymond Chen</dc:creator><description>If you want to exit the thread and free the library simultaneously (e.g., this is a silent worker thread) then you have to use FreeLibraryAndExitThread to exit your thread.&lt;br&gt;&lt;br&gt;And even if you are careful and call it only at the end of your function, you still have this problem.&lt;br&gt;&lt;br&gt;DWORD ThreadProc(LPVOID p)&lt;br&gt;{&lt;br&gt;  ... do stuff ...&lt;br&gt;  ObjectLock lock(p);&lt;br&gt;  ...&lt;br&gt;  FreeLibraryAndExitThread(hinst, 0);&lt;br&gt;}&lt;br&gt;&lt;br&gt;&lt;br&gt;</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#136825</link><pubDate>Fri, 21 May 2004 16:54:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:136825</guid><dc:creator>JCAB</dc:creator><description>I see a theme brewing here... The mixing of paradigms.&lt;br&gt;&lt;br&gt;I mean... first, incorrectly mixing automatic and manual scoping in the ATL sample, and now mixing automatic scoping with scope-breaking APIs.&lt;br&gt;&lt;br&gt;I get your point, and they are definitely easy-to-make mistakes to make that can catch the happy careless programmer unaware, but the fact of the matter is that, depending on the point of view, they are ultimately caused by either:&lt;br&gt;&lt;br&gt;1- &amp;quot;Bad&amp;quot; compiler implementatons that don't properly expose the target OS APIs in a manner according to the rules of the language, or...&lt;br&gt;&lt;br&gt;2- &amp;quot;Bad&amp;quot; OS APIs that don't take into account modern language paradims like scoping rules. But the OS can't be designed to cater to all foreseeable programming languages, so the closer you work to the OS, the more likely you'll find yourself in muddy waters. That's what frameworks and abstraction layers tend to isolate you from, but there's also...&lt;br&gt;&lt;br&gt;3- &amp;quot;Bad&amp;quot; frameworks that conform to a particular paradigm only partially. For instance, if the ATL has the CComPtr to help manage individual COM resources, but doesn't have the CCoInitialize to manage the process-global resource, then ATL can be seen to be blamed. Of course, I guess the designers of ATL didn't see the COM subsystem as a resource that needs (admittedly simple) management, thus forcing programmers to mix paradigms, so then it's a problem with...&lt;br&gt;&lt;br&gt;4- &amp;quot;Bad&amp;quot; programmers that mix paradigms without being careful about exactly how they mix them.&lt;br&gt;&lt;br&gt;I just aim to put the problem into perspective, here. Both of the examples you show would have been avoidable gotchas had there been smarter design decisions somewhere down the chain before getting to trustung the programmer to know what they are doing. IMHO.&lt;br&gt;</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#136828</link><pubDate>Fri, 21 May 2004 16:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:136828</guid><dc:creator>DrPizza</dc:creator><description>&amp;quot;And even if you are careful and call it only at the end of your function, you still have this problem. &amp;quot;&lt;br&gt;But, no, you can't, because you write an appropriate wrapper, so that your ThreadProcs actually work in a way appropriate to C++.&lt;br&gt;&lt;br&gt;</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#136854</link><pubDate>Fri, 21 May 2004 17:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:136854</guid><dc:creator>Raymond Chen</dc:creator><description>Agreed that this can be fixed with &amp;quot;more technology&amp;quot; and by &amp;quot;not mixing models&amp;quot;. But do people know to use this &amp;quot;more technology&amp;quot;? Do they know not to &amp;quot;mix models&amp;quot;? These are bugs I see in the real world. That's why I write about them.</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#136870</link><pubDate>Fri, 21 May 2004 17:31:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:136870</guid><dc:creator>JCAB</dc:creator><description>I agree that these are &amp;quot;real world&amp;quot; problems, and I agree that the threading problem is a relatively harder one, but... I mean... do we, for instance, even _mention_ the possibility of this being a problem in the ATL documentation?&lt;br&gt;&lt;br&gt;You can't prevent people from doing bad things, especially with extra-flexible languages like C++, but at least we should cover all the bases and be wordy about those we can't cover for some reason or other.&lt;br&gt;</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#136885</link><pubDate>Fri, 21 May 2004 17:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:136885</guid><dc:creator>Raymond Chen</dc:creator><description>This isn't so much an ATL problem as it is a C++ problem. Destructors run at end of scope. Sometimes that's not when you want them to run.&lt;br&gt;&lt;br&gt;ATL would have a comment like, &amp;quot;The XYZ class contains a destructor. Consequently, you must take care that the destructor runs at an appropriate time. Bypassing the destructor or running the destructor at the wrong time may lead to programming errors.&amp;quot;  Unclear whether that actually helps any.&lt;br&gt;&lt;br&gt;Besides, is it even possible to make a list of the things you can't do?</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#136900</link><pubDate>Fri, 21 May 2004 17:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:136900</guid><dc:creator>Jerry Pisk</dc:creator><description>Well, the destructor will not run but a lock will be released, the underlying Win32 API releases any synchronization objects a thread holds when that thread terminates.</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#136901</link><pubDate>Fri, 21 May 2004 18:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:136901</guid><dc:creator>Jerry Pisk</dc:creator><description>Sorry, this is Win32 code, I thought it was managed. That makes my argument about synchronization objects even more valid :)</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#136903</link><pubDate>Fri, 21 May 2004 18:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:136903</guid><dc:creator>Raymond Chen</dc:creator><description>The only sync object that is auto-released on thread death is the mutex. The others are just plain leaked. (Events and semaphores don't have owners. Critical sections are not kernel objects.)</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#137020</link><pubDate>Fri, 21 May 2004 19:09:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:137020</guid><dc:creator>Dan Maas</dc:creator><description>This is not a C++ issue, this is a process API issue. The C++ spec does not deal with the situation where your program disappears because of a function call (nor should it). It's not even a destructor issue; it's a general resource-leak thing.&lt;br&gt;&lt;br&gt;In UNIX it's common to call exit() to kill the program immediately, but it is treated only as a shortcut and most software will optionally be able to do a normal &amp;quot;return from main()&amp;quot; exit for leak-checking purposes.</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#139182</link><pubDate>Sat, 22 May 2004 00:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:139182</guid><dc:creator>Pavel Lebedinsky</dc:creator><description>&amp;gt; The only sync object that is auto-released on thread death is the mutex. &lt;br&gt;&lt;br&gt;Even for mutexes if a thread exits while holding a mutex, waiting on the mutex handle will return a special value (WAIT_ABANDONED) which most callers will treat as an error.&lt;br&gt;&lt;br&gt;ExitThread docs should probably be updated to mention the fact that C++ destructors are not called. Right now they claim that it's &amp;quot;safe&amp;quot; to use ExitThread as long as you link with DLL version of CRT (this is a bit simplified, full details are here: &lt;a target="_new" href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/exitthread.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/exitthread.asp&lt;/a&gt;).</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#139201</link><pubDate>Sat, 22 May 2004 01:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:139201</guid><dc:creator>Chris Walker</dc:creator><description>Or, how about this little gem:&lt;br&gt;&lt;br&gt;{&lt;br&gt;    ObjectLock(p);&lt;br&gt;    ... // code expecting to be protected by p&lt;br&gt;}  // dev expects ObjectLock(p) to dtor here&lt;br&gt;&lt;br&gt;The compiler won't complain.  It just happily constructs the ObjectLock and then destructs it on the same line.  Most developers will not see this.&lt;br&gt;&lt;br&gt;Some groups at Microsoft have banned this practice and have tools to discover when they are in product code.&lt;br&gt;&lt;br&gt;The joys of using a language where everything is obvious.  Not.&lt;br&gt;</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#139529</link><pubDate>Sat, 22 May 2004 17:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:139529</guid><dc:creator>Larry Osterman</dc:creator><description>Btw, Raymond's absolutely right about how easy it is to screw this stuff up.&lt;br&gt;&lt;br&gt;Quite literally the day after I posted the article that started this whole thing, I was doing a routine code review of the code one of the developers in my group was about to check in.&lt;br&gt;&lt;br&gt;And what do you know, he used global CComPtr's.&lt;br&gt;</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#139610</link><pubDate>Sat, 22 May 2004 21:44:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:139610</guid><dc:creator>Dan Maas</dc:creator><description>&amp;gt; ObjectLock(p);&lt;br&gt;&lt;br&gt;I've done that! Guilty as charged! Stumped me for a few hours. Now I'm very very careful. It's like = vs ==.&lt;br&gt;&lt;br&gt;Perhaps a macro would help?&lt;br&gt;&lt;br&gt;#define LOCK(p) ObjectLock __lock(p);&lt;br&gt;&lt;br&gt;Hmm, if there were some way to generate a unique name, this might work?</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#139776</link><pubDate>Sun, 23 May 2004 09:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:139776</guid><dc:creator>asdf</dc:creator><description>#define CONCAT_(a,b) a##b&lt;br&gt;#define CONCAT(a,b) CONCAT_(a,b)&lt;br&gt;#define ObjectLock(x) ObjectLock CONCAT(oBj3KtL0k,__LINE__) (x)&lt;br&gt;&lt;br&gt;ObjectLock(p);&lt;br&gt;&lt;br&gt;No muss, no fuss...&lt;br&gt;&lt;br&gt;Oh wait, except for the fact that Microsoft still hasn't fixed the __LINE__ bug in 7 years. But you can use __COUNTER__ to work around that.</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#139924</link><pubDate>Sun, 23 May 2004 21:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:139924</guid><dc:creator>Raymond Chen</dc:creator><description>Hm, works for me.  I cut/pasted the above four lines (five if you count the blank line) into &amp;quot;foo.cpp&amp;quot; and typed&lt;br&gt;&lt;br&gt;cl /EP foo.cpp&lt;br&gt;&lt;br&gt;and got out&lt;br&gt;&lt;br&gt;ObjectLock oBj3KtL0k5 (p);</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#139969</link><pubDate>Sun, 23 May 2004 22:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:139969</guid><dc:creator>asdf</dc:creator><description>I'm talking about this: &lt;a target="_new" href="http://support.microsoft.com/default.aspx?scid=kb;"&gt;http://support.microsoft.com/default.aspx?scid=kb;&lt;/a&gt;[LN];Q199057&lt;br&gt;</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#140100</link><pubDate>Mon, 24 May 2004 06:23:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:140100</guid><dc:creator>Raymond Chen</dc:creator><description>Personally, I don't believe that &amp;quot;Edit and Continue&amp;quot; belongs in a C/C++ compiler. If you want BASIC you know where to find it.</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#140163</link><pubDate>Mon, 24 May 2004 09:09:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:140163</guid><dc:creator>DrPizza</dc:creator><description>&amp;quot;Personally, I don't believe that &amp;quot;Edit and Continue&amp;quot; belongs in a C/C++ compiler. If you want BASIC you know where to find it. &amp;quot;&lt;br&gt;&lt;br&gt;That's one of the dumbest things I've read on this weblog.&lt;br&gt;&lt;br&gt;What /possible/ justification is there for this opinion?  Either E&amp;amp;C is useful--in which case it should be everywhere possible--or it's not, in which case it should be nowhere.  Why do BASIC authors deserve an occasionally useful feature but not C++?&lt;br&gt;</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#140164</link><pubDate>Mon, 24 May 2004 09:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:140164</guid><dc:creator>DrPizza</dc:creator><description>[quote]Agreed that this can be fixed with &amp;quot;more technology&amp;quot; and by &amp;quot;not mixing models&amp;quot;. But do people know to use this &amp;quot;more technology&amp;quot;? Do they know not to &amp;quot;mix models&amp;quot;? These are bugs I see in the real world. That's why I write about them.[/quote]&lt;br&gt;Mort probably doesn't, but I don't much care.  Mort will never get things right because he's a lazy cretin with no interest in doing his job properly.&lt;br&gt;&lt;br&gt;This is why Mort needs to be offshored and why MS should stop dumbing things down to make them Mort-friendly.&lt;br&gt;</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#140165</link><pubDate>Mon, 24 May 2004 09:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:140165</guid><dc:creator>DrPizza</dc:creator><description>I must not use message board markup on weblogs.&lt;br&gt;I must not use message board markup on weblogs.&lt;br&gt;I must not use message board markup on weblogs.&lt;br&gt;I must not use message board markup on weblogs.&lt;br&gt;I must not use message board markup on weblogs.&lt;br&gt;</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#140230</link><pubDate>Mon, 24 May 2004 12:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:140230</guid><dc:creator>Mike Raiford</dc:creator><description>&amp;gt; &amp;quot;Personally, I don't believe that &amp;quot;Edit and&lt;br&gt;&amp;gt; Continue&amp;quot; belongs in a C/C++ compiler. If you&lt;br&gt;&amp;gt; want BASIC you know where to find it. &amp;quot; &lt;br&gt;&lt;br&gt;&amp;gt; That's one of the dumbest things I've read on &lt;br&gt;&amp;gt; this weblog. &lt;br&gt;&lt;br&gt;If you use the intel compiler, get used to not having edit and continue. I rarely, if ever use this feature, and didn't miss it one bit when I started using icl8. &lt;br&gt;&lt;br&gt;Raymond has a point. You should understand your code well enough to not need Edit and Continue. If you understand what is going on, you can generally create a stream of code, and when a bug occurs, look it over and know what to fix, rather than &amp;quot;Break/Adjust This/Continue/Break/Adjust that/Continue etc...&amp;quot;&lt;br&gt;&lt;br&gt;</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#140273</link><pubDate>Mon, 24 May 2004 13:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:140273</guid><dc:creator>DrPizza</dc:creator><description>&amp;quot;If you use the intel compiler, get used to not having edit and continue. I rarely, if ever use this feature, and didn't miss it one bit when I started using icl8.&amp;quot;&lt;br&gt;&lt;br&gt;Every time I've tried using icl, what I've missed most is a code generator that generates code that actually works.&lt;br&gt;&lt;br&gt;&amp;quot;Raymond has a point. You should understand your code well enough to not need Edit and Continue.&amp;quot;&lt;br&gt;It's not about &amp;quot;understanding&amp;quot;.  It's about being able to fix inconsequential typos so that you can actually look at how the important part of the code works.&lt;br&gt;&lt;br&gt;&amp;quot;If you understand what is going on, you can generally create a stream of code, and when a bug occurs, look it over and know what to fix, rather than &amp;quot;Break/Adjust This/Continue/Break/Adjust that/Continue etc...&amp;quot;&amp;quot;&lt;br&gt;The entire reason you use a debugger is because there is a disparity between your understanding of what is going on, and what's actually going on.  If there weren't there'd be no bug, and hence no use for a debugger.  As such, talk of &amp;quot;if you understand what is going on&amp;quot; is a rather feeble attempt at misdirection; that you /don't/ understand what is going on is a prerequisite.&lt;br&gt;&lt;br&gt;</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#140276</link><pubDate>Mon, 24 May 2004 13:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:140276</guid><dc:creator>Larry Osterman</dc:creator><description>The problem with E&amp;amp;C is that people want to use it for NON trivial modifications - and that turns into a nightmare for the compiler guys.&lt;br&gt;&lt;br&gt;</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#140323</link><pubDate>Mon, 24 May 2004 15:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:140323</guid><dc:creator>Raymond Chen</dc:creator><description>Edit and Continue clearly doesn't play friendly with __LINE__ since editing changes the line numbers, and then the entire file needs to be recompiled - so much for incremental compilation.</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#140348</link><pubDate>Mon, 24 May 2004 15:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:140348</guid><dc:creator>Scott McCaskill</dc:creator><description>Re. unnamed local RAII object bug:&lt;br&gt;&lt;br&gt;&amp;quot;Some groups at Microsoft have banned this practice and have tools to discover when they are in product code.&amp;quot;&lt;br&gt;&lt;br&gt;..thereby avoiding one potential problem by creating others, especially in the presence of exceptions.&lt;br&gt;&lt;br&gt;I'm having a hard time seeing how that is considered a solution.  Do they actually consider manual resource management to be less error prone (on the whole) than using RAII in C++?</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#140882</link><pubDate>Tue, 25 May 2004 03:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:140882</guid><dc:creator>Chris Walker</dc:creator><description>re: unnamed local RAII object bug&lt;br&gt;&lt;br&gt;Actually, the Microsoft group ban the usage outside of call statements where they are pretty useful and the lifetime of the object lasts until the return from the call.&lt;br&gt;</description></item><item><title>re: Do you know when your destructors run? Part 2.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#141261</link><pubDate>Tue, 25 May 2004 14:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:141261</guid><dc:creator>DrPizza</dc:creator><description>&amp;quot;Edit and Continue clearly doesn't play friendly with __LINE__ since editing changes the line numbers, and then the entire file needs to be recompiled - so much for incremental compilation. &amp;quot;&lt;br&gt;&lt;br&gt;But this is in general no great hardship.&lt;br&gt;&lt;br&gt;__LINE__ seems to be used for two things; debug messages and for emulating hygienic macros.&lt;br&gt;&lt;br&gt;The former usage is rendered useless when one has E&amp;amp;C (one's using a debugger to avoid having to do printf() debugging, after all).  The latter usage is not all that effective (if you use the macro twice on one line you create duplicate names) and better replaced by VC++'s (admittedly non-standard) counter facility.&lt;br&gt;</description></item><item><title>Complexity  &amp;laquo; Computing Life</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/05/21/136701.aspx#3477673</link><pubDate>Sat, 23 Jun 2007 13:19:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3477673</guid><dc:creator>Complexity  « Computing Life</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://computinglife.wordpress.com/2007/06/23/how-do-you-chose-your-apis/"&gt;http://computinglife.wordpress.com/2007/06/23/how-do-you-chose-your-apis/&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>