Undisposed instance with LINQ

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
Risotto
Posts: 3
Joined: Thu May 28, 2009 10:42 am

Undisposed instance with LINQ

Post by Risotto » Thu May 28, 2009 11:13 am

Hi,

In my application I am getting a lot of undisposed instance like System.Linq.Enumerable.WhereListIterator<TestbenchChannelObj> and I have no idea where is it coming from.

I found in the forum the following older topic about a similary problem:
http://memprofiler.com/forum/viewtopic. ... light=linq

Is the behavior I see still a bug?

Risotto

Andreas Suurkuusk
Posts: 1029
Joined: Wed Mar 02, 2005 7:53 pm

Post by Andreas Suurkuusk » Thu May 28, 2009 7:06 pm

Hi,

The bug in the post you are referring only occurred for value types and only in .NET Memory Profiler 2.6. This bug is fixed in v3.x and
System.Linq.Enumerable.WhereListIterator<TestbenchChannelObj> is a class, so this should not be causing your undisposed instances.

I'm not aware of a bug or other issue that should cause the profiler to falsely classify instances as undisposed. What version of the profiler are you running?

Have you investigated the allocation call stacks of the undisposed instances? They should reveal who creates the instances, and hopefully also why they are undisposed. If you include a call stack for an undisposed instance in your reply, I will get some additional information and then I can hopefully give you a better explanation.
Best regards,

Andreas Suurkuusk
SciTech Software AB

Risotto
Posts: 3
Joined: Thu May 28, 2009 10:42 am

Post by Risotto » Wed Jun 03, 2009 11:45 am

Hello Andreas,

Thank you for your answer but because I have time pressure in my project now, I decide to remove the LINQ request from my code and replace them by "standard code".

I still don't know where the problem is coming from but now I have no more memory leaks (at least because of LINQ).

Risotto

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 25 guests