Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Add-Ins / October 2009

Tip: Looking for answers? Try searching our database.

active inspector in memory

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ashish - 23 Oct 2009 15:23 GMT
When open a mail acive inspector comes in picture (i set all events for
active inspector), get current item (mail item, set all events for mail
item) from acive inspector, modify it and save it.
When close mail free all events for mail item and active inspector and set
them null. But i found active inspector and its current item still remain in
memory until i change the selection in active explorer (after closing mail
select another mail in active explorer).  It means outlook keeps active
inspector in memory until we change any other mail. How to free active
inspector from memory without changing selection.
Ken Slovak - [MVP - Outlook] - 23 Oct 2009 21:49 GMT
I'm not sure if this is what you're talking about, or even what version of
Outlook you're using or what language, but Outlook caches items and releases
them when it feels like it. You can't force a release of an item from the
cache, in fact except in Outlook 2007 you can't even detect from Outlook
when the item is released.

There is a method in 2007 that tells you that, the item.Unload() event.

Using managed code (VB.NET or C#) can also contribute to that since even
setting an item to null won't release it fully until the RCW is destroyed
and the garbage collector runs on the item. You can help accelerate that by
calling Marshal.ReleaseComObject() on the item until the function returns 0,
then calling GC.Collect().

Signature

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

> When open a mail acive inspector comes in picture (i set all events for
> active inspector), get current item (mail item, set all events for mail
[quoted text clipped - 5 lines]
> active inspector in memory until we change any other mail. How to free
> active inspector from memory without changing selection.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.