Subscribe: Chris Lyon's WebLog
http://blogs.msdn.com/clyon/rss.aspx
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
collect  keepalive  mode  modes  myobject  new orcas  new  object  orcas part  orcas we’ve  orcas  system  weakreference  we’ve 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Chris Lyon's WebLog

Chris Lyon's WebLog



Or How I Learned To Stop Worrying And Love The GC



Last Build Date: Thu, 23 Jul 2015 04:48:06 +0000

 



The GC Test Team is Hiring!

Fri, 23 Mar 2007 15:42:00 +0000

Tired of the same old “garbage”? Do you want to be the tester for one of the most challenging technical areas of the Common Language Runtime (CLR) and work with the industry’s top developers, architects, and distinguished engineers? The CLR team is looking for a highly motivated and outstanding technical person to test the world...



New In Orcas Part 3: GC Latency Modes

Mon, 12 Mar 2007 15:10:00 +0000

As you may know, there are different GC modes to choose from depending on the type of application you’re using:  Server GC, Workstation GC, and Concurrent GC (more info).  These settings are process-wide, set at the beginning of the process.  Once the GC mode is set, it cannot be changed.  In Orcas, we’ve added the...



New In Orcas Part 2: GC Collection Modes

Wed, 07 Mar 2007 17:14:00 +0000

In Orcas we’ve added an overload to System.GC.Collect(): void System.GC.Collect(int generation, System.GCCollectionMode mode) Where generation is the highest generation to collect (from 0 to System.GC.MaxGeneration) and mode can be: Default:  the same behavior if you called GC.Collect without specifying the mode.  Currently this is the same behavior as Forced, but this is subject to change...



New In Orcas Part 1: What we’ve been doing

Tue, 06 Mar 2007 00:14:00 +0000

The Orcas March CTP is out, and what does that mean for the Garbage Collector?  The GC team has been concentrating on three areas for this release: Bug fixes.  For Orcas, we’ve fixed several premature Out of Memory bugs, improved stability in certain stressful conditions, and even improved performance in some scenarios.   GC Collection Modes.  We’ve...



When GC.KeepAlive Doesn’t

Mon, 28 Aug 2006 14:05:00 +0000

The purpose of GC.KeepAlive(Object) is to tell the GC not to collect an object until a certain point.  For example: class MyObject{   ~MyObject()   {   Console.WriteLine(“MyObject Finalized”);   }                 public static void Main()   {      MyObject obj = new MyObject();      LongRunningMethod();      GC.KeepAlive(obj); // ~MyObject will NOT be run before this call      ...   }} KeepAlive will ensure ~MyObject will not get run before LongRunningMethod gets called.  This is useful...



WeakReferences And Tracking Resurrection

Mon, 01 May 2006 20:23:00 +0000

The WeakReference class has two public constructors.    public WeakReference(Object target) public WeakReference(Object target, bool trackResurrection)   The first parameter is pretty obvious.  It’s the object you want the WeakReference to reference, without keeping the object alive.  If a WeakReference is the only thing referencing an object, then the GC is free to collect the...



Object Resurrection

Tue, 25 Apr 2006 20:38:00 +0000

I’m sure many of you have heard the term “object resurrection” with respect to the GC.  It’s an interesting (but not very useful) way to illustrate object lifetimes and the role of finalization versus garbage collection.  Basically, it’s a way to reference an object that has been finalized.   Here’s a rough description of how...



Why You Shouldn’t Rely On WeakReference.IsAlive

Thu, 20 Apr 2006 20:34:00 +0000

The WeakReference class has the property IsAlive.  The problem with it, is that you can only trust it if it returns false.   While a WeakReference points to an object that is either live (reachable), or garbage (unreachable) that has not yet been collected by the GC, the IsAlive property will return true.  After an...



New Dispose Guidelines

Thu, 14 Apr 2005 16:39:00 +0000

Joe Duffy has posted the revised Dispose, Finalization, and Resource Management Design Guideline. It's a great (and long) read. Check it out!



The Truth About GCHandles

Fri, 18 Mar 2005 13:43:00 +0000

I've heard several people asking why GCHandle doesn't implement IDisposable, considering it wraps an unmanaged resource (a handle) and needs to be explicitly freed (using GCHandle.Free()). Before I explain the reason, I want to give a little background on GCHandles and their dangers. What's a GCHandle? A GCHandle is a struct that contains a handle...