View Single Post
  #6  
Old February 14th 06, 09:59 AM posted to microsoft.public.outlook.program_addins
David Cebrian
external usenet poster
 
Posts: 15
Default outlook doesn't closed well

Hi Josh,

I run the garbage collector, but the problem persists.

thanks for your time.

"Josh Einstein" escribió en el mensaje
...
I also recommend running the garbage collector when explorers and

inspectors
count become 0.

GC.Collect();
GC.WaitForPendingFinalizers();

This will ensure anything abandoned is collected by the GC and their
finalizers are run (which decrements their reference counters, thus

freeing
your hold on the underlying COM object).

And also as I mentioned in the other group. I've found that accidentally
accessing Outlook objects from a background thread will cause random
problems with Outlook sticking around.

Oh and be sure to explicitly unbind any events you're listening to. I

found
in a memory profiler that huge trees of objects were being kept alive
because of the way .NET manages event bindings.

--
Josh Einstein
Einstein Technologies
Microsoft Tablet PC MVP
Tablet Enhancements for Outlook 2.0 - Try it free for 14 days
www.tabletoutlook.com


"Thaddaeus Parker" wrote in message
...
This is due to the fact that you are not releasing any of your objects
that are being created by your add-in. You MUST be absolutely sure that
in explorer Close Event or some uninitHandler that you are releasing
whatever objects you were using during the execution of your add-in
namely: buttons, menu items, wrapped outlook objects. Without know what
your code is doing right now, I would suggest that you in your on
disconnection event of the add-in go and set all of your
Commandbarbuttons, explorers, inspectors, folders to null (Nothing) and
see if that fixes your problem.

Regards,

Thaddaeus.
"David Cebrian" wrote in message
...
yes, when I execute the outlook without my add-in it works fine, the
problem
is when I close outlook without remove my add-in, after I can not open
the
outlook again, because the process outlook.exe still in the task

manager.


"donald" escribió en el mensaje
oups.com...
have you try outlook with out your COM add-in load to see if it is

your
add-in or not?

Donald









Ads