瀏覽代碼

QueryInterface should be matched with Release

Though in these two cases, the objects do not seem to be reference-counted anyway

Source commit: 34237b24b62bde64ff1fdbc5ee870166171134b2
Martin Prikryl 2 年之前
父節點
當前提交
1244c3e4ff
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      source/windows/GUITools.cpp

+ 2 - 0
source/windows/GUITools.cpp

@@ -1164,6 +1164,7 @@ public:
     // Something keeps the reference behind otherwise and calls it on WM_SETTINGCHANGE.
     // Would make sense with TWebBrowserEx, which leaks. But it happens even with TWebBrowser.
     FCustomDoc->SetUIHandler(NULL);
+    FCustomDoc->Release();
   }
 
 protected:
@@ -1522,6 +1523,7 @@ void LoadBrowserDocument(TWebBrowserEx * WebBrowser, const UnicodeString & Docum
       DebugAlwaysTrue(PersistStreamInit != NULL))
   {
     PersistStreamInit->Load(static_cast<_di_IStream>(*DocumentStreamAdapter));
+    PersistStreamInit->Release();
   }
 }
 //---------------------------------------------------------------------------