Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
165
Memory leak
posted

Hi,

I'm using the WinForms package (version 7.3).

While profiling my application I see that there is a memory leak that is caused but the 'colorSchemeChanged' event of Office2007ColorTable.

Here are 2 examples:

1. The MonitorNavigatorItem object is not garbage collected.

2. PrimitiveEditor object is not garbage collected.

In both cases the object that is referencing it is the colorSchemeChanged delegate. What can I do in order to prevent it from referencing it (I don't care about color scheme at all).

Thanks.


Parents
  • 69832
    Verified Answer
    Offline posted

    iftach said:
    What can I do in order to prevent it from referencing it (I don't care about color scheme at all).

    If you explicitly dispose of the control, the event handler will be dereferenced, and then the control can be garbage collected.

Reply Children