diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-05-30 15:53:00 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-05-30 15:55:01 +0200 |
commit | bb78022488ef283441c4f04cb357d7b5594348a2 (patch) | |
tree | 784e5857063751d8ffe8ac253d707da823ad9436 /cppcanvas/qa | |
parent | aaaf4c4332bbe88841d855facefe38227b9be590 (diff) |
Fix memory leak in test code
Change-Id: I318878b3fa883eebbc081a6faf6a594dad2c6e26
Diffstat (limited to 'cppcanvas/qa')
-rw-r--r-- | cppcanvas/qa/unit/test.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cppcanvas/qa/unit/test.cxx b/cppcanvas/qa/unit/test.cxx index af652a3cf727..06d8d6ea81aa 100644 --- a/cppcanvas/qa/unit/test.cxx +++ b/cppcanvas/qa/unit/test.cxx @@ -7,6 +7,9 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include <sal/config.h> + +#include <boost/scoped_ptr.hpp> #include <test/bootstrapfixture.hxx> #include <osl/file.hxx> @@ -40,8 +43,7 @@ public: void CanvasTest::testComposite() { #ifdef LINUX - Window* pWin = new WorkWindow( (Window *)NULL ); - CPPUNIT_ASSERT( pWin != NULL ); + boost::scoped_ptr<Window> pWin(new WorkWindow( (Window *)NULL )); uno::Reference<rendering::XCanvas> xCanvas = pWin->GetCanvas (); if( !xCanvas.is() ) |