msctf: Add code to track created ITfDocumentMgrs.
diff --git a/dlls/msctf/documentmgr.c b/dlls/msctf/documentmgr.c
index 66f0f50..0a25b3d 100644
--- a/dlls/msctf/documentmgr.c
+++ b/dlls/msctf/documentmgr.c
@@ -69,7 +69,12 @@
 
 static void DocumentMgr_Destructor(DocumentMgr *This)
 {
+    ITfThreadMgr *tm;
     TRACE("destroying %p\n", This);
+
+    TF_GetThreadMgr(&tm);
+    ThreadMgr_OnDocumentMgrDestruction(tm, (ITfDocumentMgr*)This);
+
     if (This->contextStack[0])
         ITfContext_Release(This->contextStack[0]);
     if (This->contextStack[1])