I have a component which fires a bunch of events. I have another component which is a wrapper for that component. The wrapper derives from DispEventSimpleImpl and therefore uses DispEventAdvise to hook up to the events in the first component.
I found that although I was receiving all the events ok in the wrapper, FinalRelease was never reached. I also found that if I did not call DispEventAdvise in FinalConstruct (if I didn't connect), FinalRelease did get called. So I tried calling DispEventUnadvise in a separate method before closing the wrapper object. This works and FinalRelease is reached. Why won't FinalRelease get called unless the sink is unadvised?
--Will Duty
wduty@radicalfringe.com
I found that although I was receiving all the events ok in the wrapper, FinalRelease was never reached. I also found that if I did not call DispEventAdvise in FinalConstruct (if I didn't connect), FinalRelease did get called. So I tried calling DispEventUnadvise in a separate method before closing the wrapper object. This works and FinalRelease is reached. Why won't FinalRelease get called unless the sink is unadvised?
--Will Duty
wduty@radicalfringe.com