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

Releasing COM Components



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 10th 08, 12:58 PM posted to microsoft.public.outlook.program_addins
Nenad Dobrilovic
external usenet poster
 
Posts: 10
Default Releasing COM Components

I have created programmatically a structure of root MAPIFolder, with
subfolders and MailItems.

Is it necessary to explicitly release all items (subfolders and mail items)
or I can release only the root MAPIFolder?
--
Nenad Dobrilovic
Ads
  #2  
Old October 10th 08, 02:09 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Releasing COM Components

Best practice is to always release everything.

Since you provide no information about your development language or platform
or even the Outlook versions you're targeting it's impossible to say more.

--
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


"Nenad Dobrilovic" wrote in
message ...
I have created programmatically a structure of root MAPIFolder, with
subfolders and MailItems.

Is it necessary to explicitly release all items (subfolders and mail
items)
or I can release only the root MAPIFolder?
--
Nenad Dobrilovic


  #3  
Old October 10th 08, 02:49 PM posted to microsoft.public.outlook.program_addins
Nenad Dobrilovic
external usenet poster
 
Posts: 10
Default Releasing COM Components

Thank you.
I am using C# and VSTO to make an add-in for Outlook 2003.
--
Nenad Dobrilovic


"Ken Slovak - [MVP - Outlook]" wrote:

Best practice is to always release everything.

Since you provide no information about your development language or platform
or even the Outlook versions you're targeting it's impossible to say more.

--
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


"Nenad Dobrilovic" wrote in
message ...
I have created programmatically a structure of root MAPIFolder, with
subfolders and MailItems.

Is it necessary to explicitly release all items (subfolders and mail
items)
or I can release only the root MAPIFolder?
--
Nenad Dobrilovic



  #4  
Old October 10th 08, 03:50 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Releasing COM Components

In that case in addition to setting all COM objects to null in the
procedures where you declare them you should also use
Marshal.ReleaseComObject() on them if you no longer need the objects or any
other related objects.

For example, if you have a locally declared Inspector object don't use
Marshal.ReleaseComObject() on it if you still need other instances of that
object anywhere in your code. Otherwise you get an RCW error when you try to
refer to the Inspector in other parts of your code.

--
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


"Nenad Dobrilovic" wrote in
message ...
Thank you.
I am using C# and VSTO to make an add-in for Outlook 2003.
--
Nenad Dobrilovic


 




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
Release COM components Nenad Dobrilovic Add-ins for Outlook 3 October 3rd 08 06:47 PM
my outlook 2007 cannot startup, but other components work well. Chris Outlook - Installation 1 May 19th 08 02:44 PM
Identifying components of email message ed Outlook and VBA 4 May 15th 07 05:41 PM
Launching Office 2007 components gets Office 2003 set up P Cause Outlook - Installation 0 July 1st 06 12:46 PM
PST files and other components Mark Outlook - Installation 4 April 1st 06 04:54 AM


All times are GMT +1. The time now is 09:31 AM.


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.