mshtml: Destroy connection points.

This commit is contained in:
Jacek Caban 2006-06-25 15:49:39 +02:00 committed by Alexandre Julliard
parent bf1724ef33
commit 7f617230a5
3 changed files with 24 additions and 0 deletions

View File

@ -197,6 +197,19 @@ static void ConnectionPoint_Create(HTMLDocument *doc, REFIID riid, ConnectionPoi
*cp = ret;
}
static void ConnectionPoint_Destroy(ConnectionPoint *This)
{
int i;
for(i=0; i<This->sinks_size; i++) {
if(This->sinks[i].unk)
IUnknown_Release(This->sinks[i].unk);
}
HeapFree(GetProcessHeap(), 0, This->sinks);
HeapFree(GetProcessHeap(), 0, This);
}
#define CONPTCONT_THIS(iface) DEFINE_THIS(HTMLDocument, ConnectionPointContainer, iface)
static HRESULT WINAPI ConnectionPointContainer_QueryInterface(IConnectionPointContainer *iface,
@ -271,3 +284,10 @@ void HTMLDocument_ConnectionPoints_Init(HTMLDocument *This)
ConnectionPoint_Create(This, &DIID_HTMLDocumentEvents, &This->cp_htmldocevents);
ConnectionPoint_Create(This, &DIID_HTMLDocumentEvents2, &This->cp_htmldocevents2);
}
void HTMLDocument_ConnectionPoints_Destroy(HTMLDocument *This)
{
ConnectionPoint_Destroy(This->cp_propnotif);
ConnectionPoint_Destroy(This->cp_htmldocevents);
ConnectionPoint_Destroy(This->cp_htmldocevents2);
}

View File

@ -157,6 +157,8 @@ static ULONG WINAPI HTMLDocument_Release(IHTMLDocument2 *iface)
release_nodes(This);
HTMLDocument_ConnectionPoints_Destroy(This);
if(This->nscontainer)
NSContainer_Release(This->nscontainer);

View File

@ -260,6 +260,8 @@ void HTMLDocument_Service_Init(HTMLDocument*);
void HTMLDocument_Hlink_Init(HTMLDocument*);
void HTMLDocument_ConnectionPoints_Init(HTMLDocument*);
void HTMLDocument_ConnectionPoints_Destroy(HTMLDocument*);
NSContainer *NSContainer_Create(HTMLDocument*,NSContainer*);
void NSContainer_Release(NSContainer*);