Outlook Add in + memory

S

Selva kumar

Hi,

I created a addin for Outlook using VSTO 2005. The Program,
Installation is fine. One of our customers has reported that installing the
Addin holds the email sent in the Outbox for some time. He also informed,
uninstalling the Addin reverts the problem. Based on this information, I
checked in my development environment and found, the memory creeps up to 130
M when I use the Addin which is 30M when the addin is not installed.

So I created a new addin with only one command button that alerts a
message when clicked. This goes to 70M. The main factor is, if the add in is
installed, clicking on the emails, read write, creeps the memory going on,
even no code is executed from the Add in. It may be caused by
AddinLoader.dll.

If the Outlook is minimised, the memory comes to 2M. Why is this huge
variance?

Is this a issue or I am missing something.

Regards

Selva kumar
 
K

Ken Slovak - [MVP - Outlook]

Outlook does use more memory as it runs and takes memory as needed. It does
release some of that memory when it is minimized. That's normal.

If it uses a lot more memory with your addin running and doesn't release
that memory or the memory usage expands way beyond normal with the addin
running as opposed to when it's not running then I'd suspect a memory leak
in your code.

Are you releasing all your COM objects as they are no longer needed? Are you
calling Marshal.ReleaseComObject() on those objects before setting them to
null as appropriate when those objects aren't needed any longer and the
RCW's for those objects aren't needed any longer?
 
K

Ken Slovak - [MVP - Outlook]

You certainly can use ReleaseComObject() but that will only release your own
object variables and in the VSTO created AppDomain.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top