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

Deleted Items



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #15  
Old March 9th 06, 06:16 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Deleted Items

I would break that up so no implicit object variables are created. In VB 6
syntax:

Dim oNS As Outlook.NameSpace
Dim oFolder As Outlook.MAPIFolder
Dim colItems As Outlook.Items

Set oNS = oOL.GetNameSpace("MAPI")
Set oFolder = oNS.GetDefaultFolder(olFolderContacts)
Set colItems = oFolder.Items

I would explicitly release objects as soon as they are no longer needed. I
would minimize the calls to the garbage collector until they are needed,
perhaps in the shutdown code and whenever you need to ensure that no cached
object references are being maintained.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Rog" wrote in message ...
OK so for example if I get a list of contacts like
GetNamespace("MAPI").GetDefaultFolder(OlDefaultFol ders.olFolderContacts).Items;
and I use it, do I need to release it when I am done with these items?
Also if I say:
object item = GetFolderFromId(entry, store);
do I need to release this item and garbage collect everytime when I am
done with it?
rog


 




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
Deleted email not going to Deleted Items folder techie_comps Outlook - General Queries 1 February 27th 06 05:59 PM
2 different Deleted Items folders?? Al Clark Outlook - General Queries 1 February 21st 06 10:49 AM
Inbox, Sent Items & Outbox in Deleted Items in Outlook 2003 & OWA with Exchange splounx Outlook - General Queries 1 February 17th 06 03:22 AM
Recover Deleted Items Paul Johnson Outlook - General Queries 1 February 9th 06 04:10 PM
how to clear deleted items? [email protected] Outlook - General Queries 3 January 16th 06 03:36 PM


All times are GMT +1. The time now is 08:34 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.