Reactions to story from Karl Seguin
Foundations of Programming - pt 7 - Addendum
http://codebetter.com/ blogs/ karlseguin/ archive/ 2008/ 05/ 04/ foundations-of-program...
I've made two additions to Part 7. The first is based on a suggestion by Greg to talk about a common cause of memory leaks - events and delegates. The second is about deterministic finalization Memory Leaks with Events There's one specific situation worth mentioning as a common cause of memory leaks: events. If, in a class, you register for an event, a reference is created to your class. Unless you de-register from the event your objects lifecycle will ultimately be determined by the event source. In other words, if ClassA (the listener) registers for an event in ClassB (the event source) a reference is created from ClassB to ClassA.
Reactions / posts that link to this post
-
The Morning Brew #87
http://blog.cwa.me.uk/2008/05/06/the-morning-brew-87/I’ve had a busy long weekend, and from the amount of good stuff written these past 3 days it looks like the .NET community has too. In the interests of not making this post too large, I’ve saved a few links for tomorrow’s brew. Software Json.NET 2.0 Released - James Newton-King - James Newton-King releases version 2.0 of this JSON supporting library, complete with quick starts and API documentation. IronPython 2.0 Beta 2 - Harry Pierson announces the latest beta release of IronPython V2 - this release has had a focus on the performance of IronPython, along with the usual bug fixing. F# 1.9.4 Now Available: Making F# Simpler and More Consistent - The Spring Refresh of the F# compiler - Don Syme gives the low down on what has changed. dotTrace 3.1 is Released! - JetBrains release an minor upgrade to their .NET profiler - this release includes support for Visual Studio 2008 and Windows Vista and 2008 LINQ.Flickr 1.3 - Mehfuz releases a new version of a LINQ implementation for the Flickr API. Information RouteEvaluator For Unit Testing Routes - Phil Haack takes a look at how you can unit test routes, and offers a Route Evaluator class to make doing this easier. Windows PowerShell V2 CTP2 - Windows PowerShell V2 CTP2 adds significantly to the functionality of V1 - however this is very much a pre-release version, so the usual caveats apply. Unit testing events - Patrick Klug looks at how you can unit test your event based code, checking that the events fire the correct number of times MVC Storefront, Part 8: Testing Controllers, Iteration 1 : - In this episode Rob Conery gets his demo up and running, looks at testing his controllers and applies the DRY principle to avoid duplication of logic in his views. How To Not Screw Up Your Application Object Model - Don’t Go All OOP On Me! - Keith Elder looks at how going for a pure OO model can cause you more problems that it solves - I think that this article is more about pre-conceived ideas over complicating the problem and how you should focus on your clients needs first, and have the OO design come out of those. Code Based Repeater for ASP.NET MVC - Phil Haack looks at using Lambda expressions with parts of the template as parameter to produce a better repeater than ForEach for the ASP.NET MVC Castle Windsor - One Small Step Towards Better Software - Casey Charlton re-publishes an old article on the benefits of using Castle Windsor IOC to improve the design and testing of an application. Adventures in F# - F# 101 Part 9 (Control Flow) - Matthew Podwysocki continues his excellent F# series with a look at Control Flow in F# - one of the bits that is similar to most other languages. Foundations of Programming - pt 7 - Addendum - Karl Seguin adds two additional points to his recent 7th part of this series - covering memory leaks with events and Deterministic Finalisation. PrismShouldNotReferenceUnity - Glenn Block talks about a pairing session he had with Ayende, and how they implemented a test for one of the team’s conventions Manage states in a multi-threaded environment without the synchronization pain - Patrick Smacchia looks at the alternatives to synchronisation for multi threaded programming. Accessing the ASP.NET Authentication, Profile and Role Service in Silverlight - Brad Abrams gives a tutorial on using the WCF services for ASP.NET authentication, profile and role services from a Silverlight client application. Go with High End Solutions - Ayende tells tales of how with a complex solution things can go well - it sounds like the key to all this is the knowledge sharing that went on Hidden Undocumented Feature of Visual Studio 2008 - Dynamic XSLT Intellisense - A very useful undocumented feature of Visual Studio 2008 - real intellisense for XSLT. This article includes lots of screen shots of it in operation, and the required registry hack at the end of the article RefactorCode Released!!! ….. BETA - GridViewGuy (AKA Mohammad Azam) announces the beta of his new site, a site which allows users to submit code, and have other users offer refactorings to make the code more beautiful. NUnit 2.4.7, 2.5, 3.0: What’s With That? - Charlie Poole clears up any confusion with the version number roadmap for the NUnit unit testing project - sounds like there are interesting features in both 2.5 and 3.0
More rising blog posts
-
Entertainment »
Sex and the City -
Business »
Octonion VI: The Octonioning -
Lifestyle »
Zahara Jolie-Pitt thinks shes pregnant with a pig -
Politics »
Georgia Offers Tax Credits to Movie, Game Makers -
Sports »
Killing Off Some Wild Yashin Rumors -
Technology »
Breaking: Condé Nast/Wired Acquires Ars Technica
More rising news stories
-
Entertainment »
Husband Calls Shania Twain Split 'Unfortunate' -
Business »
Report: Lehman to begin job cuts Monday -
Lifestyle »
Fitch hikes Devon Energy to 'BBB+'; outlook stable -
Politics »
Dan Shefelman's 'Red and Blue' -
Sports »
NBA Joins Red Cross, UNICEF to Aid Asia Relief Efforts -
Technology »
Can OpenOffice 3.0 finally replace MS Office?
Recent posts from Karl Seguin
-
What arrays and pointers have in common - or - Why arrays start at zero
10 days ago -
Foundations of Programming - pt 7 - Back to Basics: Memory
19 days ago -
Foundations of Programming - PDF
135 days ago