A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Reference to object are not being released



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 19th 08, 06:39 AM posted to microsoft.public.outlook.program_addins
Jimmy
external usenet poster
 
Posts: 39
Default 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
Ads
  #2  
Old March 19th 08, 02:50 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default 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


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CPAO: object reference not set to an instance of an object Caroline Outlook - Calandaring 2 November 29th 08 04:32 AM
Problem with Object Reference for MailItem alexcraig Outlook and VBA 3 January 6th 08 10:08 PM
Why does the Address property of the Recipient object in the Outlook object model look funny? Omatase Outlook - General Queries 2 July 13th 07 09:09 PM
Object reference not set to an instance of an object [email protected] Outlook - General Queries 0 May 17th 07 07:40 AM
what will OE users do when IE 7 is released? David DeRolph Outlook Express 4 February 15th 06 09:01 PM


All times are GMT +1. The time now is 12:41 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-2025 Outlook Banter.
The comments are property of their posters.