R
Rich B.
I have an MDI form with a single child form. I have found a couple of
circumstances that appear to cause the framework to leak Int32s, MenuItems,
MenuItemCollections and sometimes TRACKMOUSEEVENTs. This happens if I
disable/enable a menuitem, add a new menuitem programatically or click on an
entry in the mdiList menu. I am disposing the main menu in the child form
as well as in the main mdi form, so that's not the issue.
I have seen http://support.microsoft.com/default.aspx?scid=kb;en-us;817723
which appears to be either the same or a closely related issue, but
Microsoft says that this bug was fixed in v1.1 of the .NET Framework (which
is what I'm using).
Using the .NET Memory Profiler from SciTech it appears that these leaked
objects are being held in the allCreatedMenuItems hashtable in MenuItem. I
can hack around this problem by using reflection to access and clear that
hashtable in the MDI Dispose, but my company isn't comfortable with this
solution. They would prefer either a Microsoft based or recommended
solution.
Is this a know bug in the framework and is there a hotfix for it that anyone
knows of? Any suggestions?
Thanks,
Rich
circumstances that appear to cause the framework to leak Int32s, MenuItems,
MenuItemCollections and sometimes TRACKMOUSEEVENTs. This happens if I
disable/enable a menuitem, add a new menuitem programatically or click on an
entry in the mdiList menu. I am disposing the main menu in the child form
as well as in the main mdi form, so that's not the issue.
I have seen http://support.microsoft.com/default.aspx?scid=kb;en-us;817723
which appears to be either the same or a closely related issue, but
Microsoft says that this bug was fixed in v1.1 of the .NET Framework (which
is what I'm using).
Using the .NET Memory Profiler from SciTech it appears that these leaked
objects are being held in the allCreatedMenuItems hashtable in MenuItem. I
can hack around this problem by using reflection to access and clear that
hashtable in the MDI Dispose, but my company isn't comfortable with this
solution. They would prefer either a Microsoft based or recommended
solution.
Is this a know bug in the framework and is there a hotfix for it that anyone
knows of? Any suggestions?
Thanks,
Rich