Jacco van der Pol
Posts: 30
Joined: 2005-09-13
|
Hi,
I'm having trouble understanding what I have to clear up manually when closing word.
I have a SmartTagmodule & Addin module combined in one project. They are connected to eachother (Used example from this forum)
It's my smarttagmodule which causes the problem. If I comment al the actions, shut down performs allright.
1. I know I should clean up com objects, but what else?
2. How do I clean up my smarttagmodule (which event should I trap)?
3. Which goes first, the addin or the smarttagmodule?
Jacco |
|
Sergey Grischenko
Add-in Express team
Posts: 7235
Joined: 2004-07-05
|
Hi Jacco.
1. You need to clean up all objects which you get from the host app if
you are not going to use them anymore. However you shouldn't clean up
objects which you get in ADX events. ADX will do it itself.
2. You can use the RecognizerFinalize event to clean up your objects.
However, for some reason this event doesn't occur in Word. In this
situation I would advise you not to store any Word interfaces in the
local fields of the smarttag module and clean them up at once in the
events of the ADXSmartTag component.
3. Actually the addin should be cleaned first.
You can use the AddinBeginShutdown event handler to clean your
objects.
|
|
Jacco van der Pol
Posts: 30
Joined: 2005-09-13
|
Thanks Sergey, this makes things clear.
|
|