Fix a leak in WinLauncher shutdown
authoraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Dec 2008 19:51:56 +0000 (19:51 +0000)
committeraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Dec 2008 19:51:56 +0000 (19:51 +0000)
        Reviewed by Sam Weinig.

        * WinLauncher/WinLauncher.cpp:
        (_tWinMain): Replaced a delete with a Release. We can't delete the
        WebView properly since we only have a pointer to one of its
        interfaces. We also shouldn't be deleting COM objects directly anyway,
        for a number of reasons.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@38955 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitTools/ChangeLog
WebKitTools/WinLauncher/WinLauncher.cpp

index aff823f..d122dd9 100644 (file)
@@ -1,5 +1,17 @@
 2008-12-03  Adam Roben  <aroben@apple.com>
 
+        Fix a leak in WinLauncher shutdown
+
+        Reviewed by Sam Weinig.
+
+        * WinLauncher/WinLauncher.cpp:
+        (_tWinMain): Replaced a delete with a Release. We can't delete the
+        WebView properly since we only have a pointer to one of its
+        interfaces. We also shouldn't be deleting COM objects directly anyway,
+        for a number of reasons.
+
+2008-12-03  Adam Roben  <aroben@apple.com>
+
         Fix a crash on exit in WinLauncher
 
         Reviewed by Sam Weinig.
index 0b2193c..f9f0ea7 100644 (file)
@@ -232,7 +232,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
     }
 
 exit:
-    delete gWebView;
+    gWebView->Release();
     shutDownWebKit();
 #ifdef _CRTDBG_MAP_ALLOC
     _CrtDumpMemoryLeaks();