Tool Strip memory leak

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
Posts: 2
Joined: Tue Dec 08, 2009 4:51 pm

Tool Strip memory leak

Post by Nalin » Tue Dec 08, 2009 5:19 pm

I was facing memory leak in one of our software. I read about ToolStrip memory leak here and that was my problem also. I The profiler was showing "UserPrefereneChangedEventHandler" in my root path.
So, i added code to get rid of that by unregistering all the events but still I am having memory leak because of ToolStrip.
- Some of the objects of ToolStripmenuItem are Disposed but not removed and some are not even disposed.
Now i am not able to see any event in the root path, when i run the profiler.

What can i do to find out the root cause of memory leak.

Shall i attach snapshots of my root paths here?

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

Post by Andreas Suurkuusk » Wed Dec 09, 2009 3:39 pm

The root paths of the ToolStripMenuItem instances will provide information about why they are not garbage collected. If you attach the root path and preferably an allocation call stack, I can take a look at it and hopefully provide some hints about why instances are not GCed.
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests