A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Hi, Ken, What should be noticed to avoid memory leak in outlook addin?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 29th 09, 09:10 AM posted to microsoft.public.outlook.program_addins
ryotyankou via OfficeKB.com
external usenet poster
 
Posts: 101
Default Hi, Ken, What should be noticed to avoid memory leak in outlook addin?

Hi, Ken, thanks for your help so far, and i can work with my outlook addin
now, but it still have some troubles. I have three toolbar, host, editor and
viewer dialog, in ATL, VC2005, outlook2003. I use CComPtr and CComQIPtr to
process interfaces. Now it is a quite strange that if i open e-mails or
create new ones and then close them. The outlook then seems become sluggish.
This only happen in word editor mode. I do nothing specially, only hide all
other created toolbar(if it is in editor dialog)after create the toolbar. I
check my code again and again but couldn't find any useful informations why
it become sluggish, any sugguestions? Thank you. Ken.

--
Message posted via http://www.officekb.com

Ads
  #2  
Old June 29th 09, 02:18 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Hi, Ken, What should be noticed to avoid memory leak in outlook addin?

There's no way I can tell what's going on, and I don't do C++/ATL
programming. You need to run the debugger and see what processes are
consuming CPU cycles and to profile your code to see if any of it is the
cause of the problem.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"ryotyankou via OfficeKB.com" u48591@uwe wrote in message
news:9850b33529a73@uwe...
Hi, Ken, thanks for your help so far, and i can work with my outlook addin
now, but it still have some troubles. I have three toolbar, host, editor
and
viewer dialog, in ATL, VC2005, outlook2003. I use CComPtr and CComQIPtr to
process interfaces. Now it is a quite strange that if i open e-mails or
create new ones and then close them. The outlook then seems become
sluggish.
This only happen in word editor mode. I do nothing specially, only hide
all
other created toolbar(if it is in editor dialog)after create the toolbar.
I
check my code again and again but couldn't find any useful informations
why
it become sluggish, any sugguestions? Thank you. Ken.

--
Message posted via http://www.officekb.com


  #3  
Old July 1st 09, 10:37 AM posted to microsoft.public.outlook.program_addins
ryotyankou via OfficeKB.com
external usenet poster
 
Posts: 101
Default Hi, Ken, What should be noticed to avoid memory leak in outlook addin?

Hi, ken, i found that memory leak should be generated by resource files. I
use bitmap file and use PasteFace to set button image. But if i set all
button in text style(msoButtonCaption), the "memory is not enought" dialog
will not show then. Are there something i should notice while using bitmap as
resource? My process is load resource from RC file, save it in clipboard,
close clipboard, then delete the resource, and call PasteFace. Any idea?

Ken Slovak - [MVP - Outlook] wrote:
There's no way I can tell what's going on, and I don't do C++/ATL
programming. You need to run the debugger and see what processes are
consuming CPU cycles and to profile your code to see if any of it is the
cause of the problem.

Hi, Ken, thanks for your help so far, and i can work with my outlook addin
now, but it still have some troubles. I have three toolbar, host, editor

[quoted text clipped - 10 lines]
why
it become sluggish, any sugguestions? Thank you. Ken.


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...ddins/200907/1

  #4  
Old July 1st 09, 02:12 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Hi, Ken, What should be noticed to avoid memory leak in outlook addin?

If that causes a memory leak then you're not releasing all the resources
you've instantiated. I don't know how you're doing the code but if you
create any DC's (device contexts) they must be deleted as must anything else
such as memory bitmaps.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"ryotyankou via OfficeKB.com" u48591@uwe wrote in message
news:986a9cd6d55d1@uwe...
Hi, ken, i found that memory leak should be generated by resource files. I
use bitmap file and use PasteFace to set button image. But if i set all
button in text style(msoButtonCaption), the "memory is not enought" dialog
will not show then. Are there something i should notice while using bitmap
as
resource? My process is load resource from RC file, save it in clipboard,
close clipboard, then delete the resource, and call PasteFace. Any idea?


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory leak bug in inetcomm!CreateNewsHeader? oen Outlook Express 4 May 13th 09 02:24 PM
Outlook 2007 addin 'out of memory / system resources' issue oncertain machines Pete C[_2_] Add-ins for Outlook 7 February 8th 08 09:26 PM
Outlook 2003 very slow after installing on vista, memory leak? [email protected] Outlook - Installation 1 February 19th 07 02:35 PM
2 GB of memory over 1 GB of memory free, and outlook complains of being out of memory David Hettel Outlook Express 7 October 18th 06 12:08 PM
How to over coem Memory Leak and code optimization for outlook Virda Outlook and VBA 1 September 21st 06 06:24 AM


All times are GMT +1. The time now is 05:55 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.