Click here to Skip to main content
15,891,136 members
Articles / .NET

Premature .NET garbage collection, or "Dude, where's my FooBar?"

Rate me:
Please Sign up or sign in to vote.
5.00/5 (15 votes)
3 Sep 2011CPOL6 min read 48.9K   8  
A surprising and potentially destructive 'feature' of the .NET garbage collector

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
29 Aug 2011supercat9
It would be very nice if one could ask the .NET compilers to automatically add GC.KeepAlive(this) to the end of a class' methods; IMHO, that should have been a default behavior for classes that override Finalize. Unfortunately, since that isn't possible, one should probably, as a matter of...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Founder Pixel Analytics Ltd.
United Kingdom United Kingdom
My expertise is concentrated on image processing and analysis; I've been doing it most of my working life. Now I offer consultancy through my own company, as well as developing software products.

Comments and Discussions