I just starting using, and bought, YourKit today, so this might be just a newbie misunderstanding.
I've been investigating GC Handles issues when creating and unloading app domains.
With this tiny test app below the GC Handles count in YourKit rises by 34 handles for each CreateDomain/Unload. (The different app domain name is important.)
So this was alarming me.
But in PerfMon it goes up and down between about 4 and about 70, apparently not having much to do with the 5 second cycle of the CreateDomain/Unloads, and seemly fine.
So I'm wondering what GC Handles is indicating? (Since it seems to just be accumulating.)
Thanks!
Code: Select all
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
for (int i = 0; i < 1000; i++)
{
var appDomain = AppDomain.CreateDomain(string.Format("Whatever{0}", i.ToString()));
AppDomain.Unload(appDomain);
Thread.Sleep(5000);
}
}
}
}