The World According to Nick
Politics, News, Photography, and Triathlons... What don't I talk about?
Wednesday, March 24, 2004
<< The Outsourcing Bogeyman C# FAQ: Object.Equals vs. operator == >>
Writing Around the Garbage Collector
Or Teaching an old dog new tricks: GC fun in Whidbey. A blog by Brad Abrams on some new features added to the Whidbey release of Visual Studio .NET (and the .NET framework) to workaround issues that non-deterministic finalization causes with regards to unmanaged memory. Basically they've added two new features:

  1. GC.AddMemoryPressure. This function lets the GC know the true cost of a managed object when you have written a small wrapper around unmanaged memory that could be possibly large. This allows the GC to collect sooner then it might normally.
  2. HandleCollector class. This is a class that allows you to inform the GC of a limited number of objects available (database connections, handles, etc.) so that it can cause a collection to occur when these resources may be running low.

Of course both of these solutions are hacks, and what they need instead is Deterministic Finalization... but we've been over that before.
# Posted at 1:09 PM by Nick  |  Comment Feed Link No Comments  |  No Trackbacks

 Add to del.icio.us |  Digg this Post | Filed Under: Old Blog

Comments are closed.


© Copyright 2012 Nick Schweitzer
Powered By newtelligence dasBlog 1.9.7067.0
Theme Based on Design By maystar