System.Object[] holding on to Custom Lists?

Memory profiling for .NET developers

Moderators: Luke Jefferson, StephenC, AndrewH, melvyn.harbour, james.billings, Laura Morley, dene.boulton

System.Object[] holding on to Custom Lists?

Postby ngodugu » Tue May 24, 2011 8:11 pm

Hi All,

I have multiple Custom Collection objects that inherit from CollectionBase.

When I profile the app using memory leak profiler, it shows that arrays of these objects are still in memory. The retention graph for all these objects is the same.

Image

It shows that a System.Object[] is holding on to CustomCollection

My custom collection object is called OrderBuyerSellerList.
Any ideas?

Thanks in advance.
Neelima
ngodugu
 
Posts: 6
Joined: Mon Jan 31, 2011 9:33 pm

Postby Brian Donahue » Thu May 26, 2011 3:43 pm

Hello,

From this part of the picture, you wouldn't be able to work out why some objects are still on the managed heap. You can use some of the filters to try to work out the reason, for instance if the object needs to be disposed or has a finalizer pending. I'd have a look at the filters and see if they point you in the right direction.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

System.Object[]

Postby ngodugu » Thu May 26, 2011 3:46 pm

Brian,

Thanks for responding. Would it help if I send the profiler results?

Thanks
Neelima
ngodugu
 
Posts: 6
Joined: Mon Jan 31, 2011 9:33 pm

Postby ngodugu » Thu May 26, 2011 3:58 pm

Is there a way to send you an attachment? Please let me know.
ngodugu
 
Posts: 6
Joined: Mon Jan 31, 2011 9:33 pm

Postby Brian Donahue » Thu May 26, 2011 4:33 pm

You can just send it to support@red-gate.com. We don't make any guarantees because we do not provide consultancy services, but it wouldn't hurt to have a 5-10 minute look at it.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby ngodugu » Thu May 26, 2011 4:52 pm

The compressed version is about 63MB and it does not allow me to send the attachment that size. Not sure if there is another way to send the document.
Question
when I checked "object that are not disposed" filter.. the class list became empty. Does that mean that these lists are not potential memory leaks?

Thanks
Neelima
ngodugu
 
Posts: 6
Joined: Mon Jan 31, 2011 9:33 pm

Postby Brian Donahue » Fri May 27, 2011 1:03 pm

When I look at the resullts you sent I do see System.Object[645] attached to the GC Root in the Instance Retention Graph, but the live count of OrderBuyerSeller is only 1, using 32 bytes, so even if this is leaking it's not a very big one. I think the array size shown in the retention graph is the allocation size. The docs are not clear about where this information comes from though.

"Objects that are not disposed" is listing objects that implement IDisposable and haven't had their Dispose() method called as far as I can tell.

I don't see much of an indication of a memory leak at all as the performance counters between snapshot 2 and 3 hold pretty steady at 256MB.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am


Return to ANTS Memory Profiler 7

Who is online

Users browsing this forum: No registered users and 0 guests