Newbe: Is this a leak

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
Teddy_R
Posts: 2
Joined: Thu Mar 05, 2020 9:57 am

Newbe: Is this a leak

Post by Teddy_R » Fri Mar 06, 2020 2:23 pm

Hi.

I new to .Net profiler, and it is a bit owerwhelming..

I have this element that keeps coming up, but i'm not sure if it is a leak.

See image


Could sombody give me a hint.
- Does it look problematic ?

Basicly it is an XMLDocument that is added nodes from one thread, and then the node is removed quickly after from another thread

Image
https://imgur.com/gallery/bSyu29O

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

Re: Newbe: Is this a leak

Post by Andreas Suurkuusk » Mon Mar 09, 2020 8:33 am

The instance graph shows that you have an XmlDocument that is kept alive through the X_Doc field of a Lokal_bon instance. As long as you intend to use the data in the XmlDocument again this is not a memory leak. And since the Local_bon instance is referenced be a method (Send_the_rest) it seems like it is being actively used when the snapshot was collected.

Once the XmlDocument is no longer needed, the X_Doc field of the Lokal_bon can be set to null and then the XmlDocument may get eligible for garbage collection (unless it's referenced by other instances/roots).
Best regards,

Andreas Suurkuusk
SciTech Software AB

Teddy_R
Posts: 2
Joined: Thu Mar 05, 2020 9:57 am

Re: Newbe: Is this a leak

Post by Teddy_R » Mon Mar 09, 2020 1:43 pm

Thanks.

That puts my mind to rest
:D

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 13 guests