Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FinalRelease/DispEventAdvise problem

Status
Not open for further replies.

wduty

Programmer
Jun 24, 2000
271
US
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 figured it out. Thanks though if anyone was going to answer.
--Will Duty
wduty@radicalfringe.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top