B
Brian Stoop
Hi,
When I run the simple Console application below, the memory keeps climbing.
Is there a way to use the ThreadPool and avoid this memory problem ?
thanks, Brian
using System;
using System.Text;
using System.Threading;
namespace Abc
{
class Program
{
static void Main(string[] args)
{
for (int i=0; i>=0; i++)
{
Thread.Sleep(0);
ThreadPool.QueueUserWorkItem(new WaitCallback(sayHello));
}
}
public static void sayHello(Object o)
{
Console.WriteLine("hello");
}
}
}
When I run the simple Console application below, the memory keeps climbing.
Is there a way to use the ThreadPool and avoid this memory problem ?
thanks, Brian
using System;
using System.Text;
using System.Threading;
namespace Abc
{
class Program
{
static void Main(string[] args)
{
for (int i=0; i>=0; i++)
{
Thread.Sleep(0);
ThreadPool.QueueUserWorkItem(new WaitCallback(sayHello));
}
}
public static void sayHello(Object o)
{
Console.WriteLine("hello");
}
}
}