[PATCH] Fix a leak & remove leftover cout that I missed

Luke Dixon 6b8b4567 at gmail.com
Wed Nov 24 09:06:10 PST 2010


---
 starmath/qa/cppunit/test_nodetotextvisitors.cxx |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
index 93def14..cd8aee0 100644
--- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx
+++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
@@ -5,9 +5,6 @@
 
 #include "sal/config.h"
 
-#include <iostream>
-using namespace std;
-
 #include <cppuhelper/bootstrap.hxx>
 #include <comphelper/processfactory.hxx>
 #include <cppunit/TestAssert.h>
@@ -41,7 +38,6 @@ struct assertion_traits<String>
         std::string text = ByteString(x, RTL_TEXTENCODING_UTF8).GetBuffer();
         OStringStream ost;
         ost << text;
-        cout << ost.str();
         return ost.str();
     }
 };
@@ -453,6 +449,9 @@ void Test::parseandparseagain(const char *formula, const char *test_name)
     CPPUNIT_ASSERT_EQUAL_MESSAGE(test_name,
         output1,
         output2);
+
+    delete pNode1;
+    delete pNode2;
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
-- 
1.7.3.2


--=-xn4Hu9n7CDTSXp5PWeCF--



More information about the LibreOffice mailing list