Reference to object are not being released

  • Thread starter Thread starter Jimmy
  • Start date Start date
J

Jimmy

I created a COM Add Ins to add a button to Outlook toolbar. This button
shows a form with a combobox when clicked. It keeps a reference to the form
in memory in the release even when I close the form. My question is how can
I release the object from the memory? Right now, I will close the form twice
when I open the email twice.

Thanks.
Jimmy
 
You really need to provide more information when you post with a problem.
You should provide the Outlook version, the platform and language you used
and show a short snippet of your code.

Is this a WinForms form? In the form code are you releasing any objects you
created in the form in the dispose code? Are you releasing any handles to
the form and the UI you created and the item itself by setting them to null
or Nothing? For COM objects you might have to call Marshal.ReleaseComObject
on each COM object, although you have to be careful of that if the
underlying COM object must still retain its references.
 
Back
Top