Re: [ADVANCED-DOTNET] ThreadPool.QueueUserWorkItem Memory Problems

2004-06-08 Thread Manuel Costa
Are you doing something like this? for(int i = 0; i<1000; i++) { System.Threading.ThreadPool.QueueUserWorkItem(new System.Threading.WaitCallback(PostData),state); } Don't forget that you fill a queue. If thread pool execution rate is smaller than task submission you can have a problem

Re: [ADVANCED-DOTNET] ThreadPool.QueueUserWorkItem Memory Problems

2004-06-07 Thread Arlie Davis
Use the CLR memory profiler. It does a good job of showing you what's chewing up memory. That is, if it is instances of managed classes. If you're leaking unmanaged memory, it's more difficult to diagnose. -- arlie -Original Message- From: Unmoderated discussion of advanced .NET topics

Re: [ADVANCED-DOTNET] ThreadPool.QueueUserWorkItem Memory Problems

2004-06-07 Thread Paul Johansen
Sent: Monday, June 07, 2004 1:49 PM To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] ThreadPool.QueueUserWorkItem Memory Problems WaitCallback class ? Are you creating a "WaitCallback" class for each queue item? --- Paul Johansen <[EMAIL PROTECTED]> wrote: > I

Re: [ADVANCED-DOTNET] ThreadPool.QueueUserWorkItem Memory Problems

2004-06-07 Thread Paul Johansen
EMAIL PROTECTED] On Behalf Of Sam Ang Sent: Monday, June 07, 2004 1:42 PM To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] ThreadPool.QueueUserWorkItem Memory Problems How about setting your state object to null at the end of your PostData? sam --- Paul Johansen <[EMAIL PROTECTED]> wrot

Re: [ADVANCED-DOTNET] ThreadPool.QueueUserWorkItem Memory Problems

2004-06-07 Thread Sam Ang
WaitCallback class ? Are you creating a "WaitCallback" class for each queue item? --- Paul Johansen <[EMAIL PROTECTED]> wrote: > I have implemented a multithreaded solution where I > am calling > ThreadPool.QueueUserWorkItem and I am passing both > the WaitCallback > class (using a method called

Re: [ADVANCED-DOTNET] ThreadPool.QueueUserWorkItem Memory Problems

2004-06-07 Thread Sam Ang
How about setting your state object to null at the end of your PostData? sam --- Paul Johansen <[EMAIL PROTECTED]> wrote: > I have implemented a multithreaded solution where I > am calling > ThreadPool.QueueUserWorkItem and I am passing both > the WaitCallback > class (using a method called PostDa