]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed memory leak in DoPrint
authorVáclav Slavík <vslavik@fastmail.fm>
Sat, 26 May 2001 10:04:03 +0000 (10:04 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sat, 26 May 2001 10:04:03 +0000 (10:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10333 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/html/htmprint.cpp

index 811147e71f8c850d0e6a6388103a0217a3aa37aa..4000a2e7196a67d71632a856b55317bf2b882da8 100644 (file)
@@ -471,7 +471,9 @@ bool wxHtmlEasyPrinting::PrintFile(const wxString &htmlfile)
 {
     wxHtmlPrintout *p = CreatePrintout();
     p->SetHtmlFile(htmlfile);
-    return DoPrint(p);
+    bool ret = DoPrint(p);
+    delete p;
+    return ret;
 }
 
 
@@ -480,7 +482,9 @@ bool wxHtmlEasyPrinting::PrintText(const wxString &htmltext, const wxString &bas
 {
     wxHtmlPrintout *p = CreatePrintout();
     p->SetHtmlText(htmltext, basepath, TRUE);
-    return DoPrint(p);
+    bool ret = DoPrint(p);
+    delete p;
+    return ret;
 }