Reference to object are not being released

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
 
K

Ken Slovak - [MVP - Outlook]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top