Board index » delphi » Browser Helper and Event sinking
pece
Delphi Developer |
Browser Helper and Event sinking2004-05-10 08:13:57 AM delphi96 Hi, Using one of your posts in here I am sinking onclick for some of our webinterfaces links using: L:=(links.item(j,0) as IHTMLElement); if L=nil then Continue; begin OldEvent := L.Onclick; // so you can restore it later NewEvent := TEventObject.Create(MyEvent) as IDispatch; L.onclick := NewEvent; end; My problem is now that, I think, this will lead to a memory leak while NewEvent is never released while user is just closing the page. I couldn't think yet of a method and I am not absolutely sure about this being true. Any help, hint will be apreciated. Event object is the one declared as: type TEventObject = class(TInterfacedObject, IDispatch) Thank you. |