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 PostData) as well as
> the state object (a
> custom class consisting of four strings and a bool).
>
>
>
> When I do this, I am leaking memory like crazy (>
> 1MB/sec).  If I call
> the PostData method in a single threaded fashion, I
> see no memory leaks
> at all. Is there something that I need to do to
> ensure that the memory
> associated with the state passed in with
> QueueUserWorkItem is released?
>
>
>
> It seems as though this is a similar problem to not
> calling EndInvoke on
> asynchronous delegates, but I am not sure.
>
>
>
> Thanks for any insight.
>
>
>
> Paul
>
>
> ===================================
> This list is hosted by DevelopMentorŪ
> http://www.develop.com
> Some .NET courses you may be interested in:
>
> NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
> http://www.develop.com/courses/gaspdotnetls
>
> View archives and manage your subscription(s) at
http://discuss.develop.com





__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com
Some .NET courses you may be interested in:

NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to