The Old New Thing

Everybody thinks about CLR objects the wrong way (well not everybody)

Many people responded to Everybody thinks about garbage collection the wrong way by proposing variations on auto-disposal based on scope: "Any local variable that is IDisposable should dispose itself when it goes out of scope." "You should be able to attach an attribute to a class that says the destructor should be called...

When does an object become available for garbage collection?

As we saw last time, garbage collection is a method for simulating an infinite amount of memory in a finite amount of memory. This simulation is performed by reclaiming memory once the environment can determine that the program wouldn't notice that the memory was reclaimed. There are a variety of mechanism for determining this. In a basic ...

Everybody thinks about garbage collection the wrong way

Welcome to CLR Week 2010. This year, CLR Week is going to be more philosophical than usual. When you ask somebody what garbage collection is, the answer you get is probably going to be something along the lines of "Garbage collection is when the operating environment automatically reclaims memory that is no longer being used by the program. ...

Raymond misreads flyers, episode 2: It Takes You

As part of a new phase in Microsoft's continuing recycling efforts, the recycling program got a new motto. The new motto was not announced with any fanfare. Rather, any recycling-related announcement had the new motto at the top as part of the letterhead. The new motto: It Takes You. I had trouble parsing this at first. To me, it sounded ...

How many failure reports does a bug have to get before Windows will fix it?

When a program crashes or hangs, you are given the opportunity to send an error report to Microsoft. This information is collected by the Windows Error Reporting team for analysis. Occasionally, somebody will ask, "How many failures need to be recorded before the bug is fixed? A thousand? Ten thousand? Ten million?" Each team at Microsoft ...

Don't forget to replace your placeholder bitmaps with real bitmaps

The story We Burned the Poop reminded me of an embarrassing story a colleague of mine related from earlier in his programming career. During the development of the product he was working on, the programmers needed an image for a comparatively rarely-used piece of the user interface. Since programmers aren't graphic designers, they inserted a...

A brief conversation while preparing to hike along the Pacific coast

Many years ago, one of my colleagues (who happens to be an avid outdoorsy person with a dry sense of humor) assembled a small group of people to take a long weekend hike along the Capa Alava Trail and then north along the Pacific coast. As we gathered in the parking lot midday Friday with our backpacking gear, another of our colleagues (whom...

Did I know where the Novell short file name behavior came from?

Commenter Yuhong Bao asks, "Do you know that the Novell behavior described in "Not all short filenames contain a tilde" came from HPFS?" Yes, but it was not relevant to the discussion so I didn't bother mentioning it. Going into more detail on the history of the Novell "long namespace" would just encourage people to conclude, "This problem ...