![]() |
active inspector in memory
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. |
active inspector in memory
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(). -- 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 "Ashish" wrote in message ... 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. |
All times are GMT +1. The time now is 12:28 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