Disposing COM Object.

May 10, 2010 at 11:07 AM

Hello there,

I stuck with the following problem, that I could not able to dispose the COM object when closing the window.

I have the following hierarchy

Client <- Container <- MEF <- UserControls

which is roughly

Show.Dialog <- Form.Controls.Add(UserControl) <- MEF <- UserControl(Contains an instance of COM object)

The functionality of Container is to host the usercontrol on a windows form.

Problem: How it is possible to dispose the COM object in usercontrol when closing the windows form.

Best Regards,






May 10, 2010 at 11:24 AM

Further the Client is Un-Managed.