I'm working on a VSTO Addin for Outlook and using .Net TPL/PFX Library to access the OOM.
Here's a snippet:
Parallel.ForEach(mailItem.Recipients.OfType<Outlook.Recipient>(), x =>
{
try
{
Outlook.Recipient recipient = x as Outlook.Recipient;
...
I've come across some threads here talking about OOM running in STA so wondering if the above is useful or in anyway degrades performance. Also, what type of Cleanup/ComRelease should be accounted for in such code?
Can any VSTO Outlook expert comment on this please?