Thread: Ref leaks
View Single Post
  #2  
Old August 6th 09, 03:10 AM posted to microsoft.public.outlook.program_addins
John Erickson[_2_]
external usenet poster
 
Posts: 27
Default Ref leaks

Sorry. This post was premature. I found a bug in my sink object class that
was causing the problem. Everything works fine now.

John

"John Erickson" wrote:

Hi,

I am developing a new Outlook addin that adds a new form region to the
reading pane and the inspector windows. I noticed that the advise() call I
make to hook up the events for the fields on my form result in a
QueryInterface of my Sink Object which results in its ref count being
increased, but I never see a Release() call come back for my event object.
How do I know when I can get rid of my event sink object? Also, it appears
that when I change my selection from one mail item to another my form gets
destroyed and a new one is created that I have to hook up the events to
again. Why don't I see Release() calls on my old event sinks when that
happens? Is it leaking more than just the ref counts when this happens? I
know I need to have multiple event sink objects hanging around for my form
interaction (One for the reading pane and one for every Inspector that is
running) How can I tell when these objects can safely go away without proper
ref counting?

Ads