Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

The GC Test Team is Hiring!

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
Posted by clyon | 1 Comments
Filed under:

New In Orcas Part 3: GC Latency Modes

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
Posted by clyon | 7 Comments
Filed under: ,

New In Orcas Part 2: GC Collection Modes

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
Posted by clyon | 5 Comments
Filed under: ,

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

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
Posted by clyon | 1 Comments
Filed under: ,

When GC.KeepAlive Doesn’t

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();
Posted by clyon | 6 Comments
Filed under:

WeakReferences And Tracking Resurrection

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
Posted by clyon | 3 Comments
Filed under:

Object Resurrection

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
Posted by clyon | 3 Comments
Filed under:

Why You Shouldn’t Rely On WeakReference.IsAlive

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
Posted by clyon | 5 Comments
Filed under:

New Dispose Guidelines

Joe Duffy has posted the revised Dispose, Finalization, and Resource Management Design Guideline . It's a great (and long) read. Check it out!
Posted by clyon | 0 Comments
Filed under:

The Truth About GCHandles

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
Posted by clyon | 6 Comments
Filed under: ,

Brian Talks About SafeHandles

A great post on the BCL Team Blog by Brian Grunkmeyer about SafeHandles . He explains in-depth the topic I brought up ago a few posts ago about mitigating race conditions with the finalizer. Definitely worth a read.
Posted by clyon | 0 Comments
Filed under:

How To Tell Which GC Mode Your Application Is Using

I posted previously about how to set the GC mode your application. So now that you’re running your app, how do you know it’s running in that GC mode? If you’re using v1.0 or v1.1, the CLR loads a different dll based on which GC mode (mscorwks.dll for
Posted by clyon | 8 Comments
Filed under: ,

To Null or Not to Null

GC Myth: setting an object's reference to null will force the GC to collect it right away. GC Truth: setting an object's reference to null will sometimes allow the GC to collect it sooner. As much as you may want to, you can't guarantee the GC will collect
Posted by clyon | 13 Comments
Filed under:

Part 2 in Maoni's Using GC Efficiently

Maoni posted Part 2 to Using the GC Efficiently. A very in-depth article about Server, Workstation and Concurrent GC. Check it out.
Posted by clyon | 0 Comments
Filed under:

Dispose Dos and Don'ts

Due to the positive response on my previous entry on Dispose, I thought I'd write another, this time on what one should and shouldn't do with a Dispose method. Dispose should contain code to release any unmanaged resources associated with the object's
Posted by clyon | 18 Comments
Filed under:
More Posts Next page »
 
Page view tracker