Revisionist History

Based on the excellent user feedback, I have significantly revised my article on the history of the strange VB/VBScript programming practice of habitually clearing objects unnecessarily right before they go out of scope. 

The revisions were sufficiently large that it seemed better to revise the original article with the new information rather than posting a followup.  In the interests of journalistic integrity and historical truth, I've preserved the original, less clueful version in my new “Revisionist History“ archive.

The less clueful original version is here. The more clueful revision is here.

Comments (4)

  1. Silly comment: The first "here" link points to a file: url… 🙂

  2. Eric Lippert says:

    Whoops. Cut-n-paste bug. Fixed.

  3. Bob Riemersma says:

    It would be nice if somebody could collect up all of this fact and fiction and synthesize some sort of comprehensible set of guidelines. Without such a widely available work I can only recommend that VBScripters continue to adhere to the widely-held rule to release objects early and often.

    Somebody ought to ‘splain that to "The Scripting Guys" who seem bent on creating ever more Cargo Cultists among the TechNet community. Er, except that they err the other way and leave out object releasing from their examples – which as we’ve seen can result in problems. Teaching "Set them all to Nothing" has no bad side effects whatsoever but makes some feel vaguely ill at ease. I’ll take intellectual discomfort over buggy code any day.

    Hashing this over was a useful excercise in any case though. Thanks Eric.

  4. I second that motion, Bob! And cheers Eric!

Skip to main content