Re: Unit testing event handlers
- From: "David Veeneman" <davidv@xxxxxxxxxx>
- Date: Tue, 27 Nov 2007 09:36:12 -0600
Nope--the garbage collector won't collect it if you haven't unsubscribed.
Ask the Princeton team for the DARPA Grand Challenge:
http://www.codeproject.com/showcase/IfOnlyWedUsedANTSProfiler.asp
A memory leak of this exact type torpedoed their entry in DARPA's $2 million
Grand Challenge. So, yes, you do have to unsubscribe.
But the suggestion about 'finally' is a good one.
David Veeneman
Foresight Systems
.
- Follow-Ups:
- Re: Unit testing event handlers
- From: DeveloperX
- Re: Unit testing event handlers
- From: Marc Gravell
- Re: Unit testing event handlers
- From: Jon Skeet [C# MVP]
- Re: Unit testing event handlers
- References:
- Unit testing event handlers
- From: David Veeneman
- Re: Unit testing event handlers
- From: Marc Gravell
- Unit testing event handlers
- Prev by Date: creating and using strongly named assembly
- Next by Date: Re: C++ and C# integrate
- Previous by thread: Re: Unit testing event handlers
- Next by thread: Re: Unit testing event handlers
- Index(es):
Relevant Pages
|