Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Add-ins for Outlook (http://www.outlookbanter.com/add-ins-outlook/)
-   -   Reference to object are not being released (http://www.outlookbanter.com/add-ins-outlook/68870-reference-object-not-being-released.html)

Jimmy March 19th 08 06:39 AM

Reference to object are not being released
 
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

Ken Slovak - [MVP - Outlook] March 19th 08 02:50 PM

Reference to object are not being released
 
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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Jimmy" wrote in message
...
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




All times are GMT +1. The time now is 12:35 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com