Hi,
In .net memory profiler under call/stack method tab when I click on a method It shows me live instances.
I have attached screen shot of that live instances.
I want to know what is the meaning of this same number of weakreferenc and <gchandles>.
Please explain how to overcome this memory leak .
Thanks,
Hemant
Remove WeakReferences
Remove WeakReferences
- Attachments
-
- Weakreferences
- memory.PNG (4.71 KiB) Viewed 8365 times
-
- Posts: 1030
- Joined: Wed Mar 02, 2005 7:53 pm
Re: Remove WeakReferences
The <GCHandle> type is not a real .NET type, it represents the internal GC handle that is used internally by the runtime. A <GCHandle> can be created using the struct System.GCHandle and the WeakReference class. Since WeakReferences are implemented using <GCHandles>, you will always have one <GCHandle> for each WeakReference. In your case, you have selected a method that creates a set of WeakReferences (and indirectly a set of <GCHandles>). Whether this is a memory leak or not cannot be decided using the information you provided. I recommend that you investigate the details of the WeakReferences. The root path of the WeakReference will tell you why it has not been GCed, and hopefully this will help you find out whether it is mistakenly prevented from being GCed (i.e. if it's a memory leak), or if the WeakReference is still being used.
Best regards,
Andreas Suurkuusk
SciTech Software AB
Andreas Suurkuusk
SciTech Software AB
Re: Remove WeakReferences
Hi,
Thanks for reply.
I have clicked on weakreference and it shows following detail.
Controls.Checkbox..ctor() userCheckbox.vb
Checkbox __ENCList Object[] #419[350]
Can you please explain me what is shows as I am new in .net profiler .
Thanks ,
Hemant
Thanks for reply.
I have clicked on weakreference and it shows following detail.
Controls.Checkbox..ctor() userCheckbox.vb
Checkbox __ENCList Object[] #419[350]
Can you please explain me what is shows as I am new in .net profiler .
Thanks ,
Hemant
Who is online
Users browsing this forum: No registered users and 18 guests