I have discovered, via process handle counts in task manager, that my
Outlook AddIn leaks a small number of handles each time it performs its
process.
Has anyone else encountered this?
Using ProcMon from sysinternals.com (dumping the handles list to file and
im****ting that into SQL Server for analysis) I see that it's leaking
handles
to Win32 thread and event objects. I'm not explicitly/directly creating
either of these, so there must be something sloppy in VB or one of the
components I'm using.
I am absolutely certain that all of my class/form/user control objects are
unloading correctly, I have an option to log class initialize/terminate
events (plus load/queryunload/unload for forms) to the debugging ****t.
Each
class is assigned a sequential ID when it initializes and that ID is
included in the debugging ****t dump. It makes it very apparent when any
of
my objects are kept in memory beyond their intended scope for any reason.
At the moment I'm taking measures to make sure none of the asynchronous
XML
objects I create are falling out of scope in a state other than 'ready'
(there is already code to wait for this but it gives up and exits anyway
after a short time.) If it was leaking only when network problems cropped
up, I wouldn't be concerned, but it's consistently growing its handle
count
even under perfect conditions.
Note that I have neither observed nor received re****ts of any related
consequences, but regardless, no leak is a good leak. Handle tables in
Win32 are huge but still finite.
Any insight, as always, is appreciated.
-Mark


|