]> git.saurik.com Git - wxWidgets.git/commitdiff
fix memory leak in the usage example
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 27 Oct 2007 17:57:13 +0000 (17:57 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 27 Oct 2007 17:57:13 +0000 (17:57 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/snglinst.tex

index 16544113cb9a76c52aa4c3ee343213c4dc81ca43..3cae29f16820b90b6eb46f34c6071134fa028c8e 100644 (file)
@@ -30,6 +30,9 @@ bool MyApp::OnInit()
     {
         wxLogError(_("Another program instance is already running, aborting."));
 
+        delete m_checker; // OnExit() won't be called if we return false
+        m_checker = NULL;
+
         return false;
     }