PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook Program Addins
oom doesnt free memory while looping through items collection.
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook Program Addins
oom doesnt free memory while looping through items collection.
![]() |
oom doesnt free memory while looping through items collection. |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hello,
oom 2002 doesnt free memory while i loop though items collection. dim iItems as Outlook.Items Dim iItems2 as outlook.Items Dim iItem as Object Dim newItem as Object set iItems=...... for each iItem in iItems set newItem = iItems2.Add("IPM.Appointmen.MyPM") newItem.SomeProp = iItem.SomeProp .... newItem.Save set newItem=Nothing next While iterating throug iItems collection oom doesnt free memory and i end up with windows running out of sysres. Are there any warkarounds for this problem? Thanks! |
|
|
|
#2 |
|
Guest
Posts: n/a
|
That is a known bug in Outlook memory management. Aside from
increasing the Windows virtual memory available on the computer you can use CDO 1.21 code or Redemption code (www.dimastr.com/redemption) to work with an object model that has fewer memory leaks. If you are using the Outlook object model you can restrict the Items collection to make it smaller and you can use SetColumns to set the fields you will work with to reduce the memory footprint of the collection. Both also will speed up your code. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Lead Author, Professional Outlook 2000 Programming, Wrox Press Lead Author, Beginning VB 6 Application Development, Wrox Press Attachment Options http://www.slovaktech.com/attachmentoptions.htm Extended Reminders http://www.slovaktech.com/extendedreminders.htm "John Smith" <vitalij@alittera.com> wrote in message news:enKgb$rSDHA.1912@tk2msftngp13.phx.gbl... > Hello, > > oom 2002 doesnt free memory while i loop though items collection. > > > dim iItems as Outlook.Items > Dim iItems2 as outlook.Items > Dim iItem as Object > Dim newItem as Object > > set iItems=...... > > for each iItem in iItems > set newItem = iItems2.Add("IPM.Appointmen.MyPM") > newItem.SomeProp = iItem.SomeProp > .... > newItem.Save > set newItem=Nothing > next > > > While iterating throug iItems collection oom doesnt free memory and i end > up with windows running out of sysres. > Are there any warkarounds for this problem? > > Thanks! > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

