]> git.saurik.com Git - wxWidgets.git/commitdiff
fix memory leak in URL test
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 30 Dec 2008 13:18:22 +0000 (13:18 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 30 Dec 2008 13:18:22 +0000 (13:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

tests/net/socket.cpp

index a34993bc7bb2ce0a3eb7bb16faa782e6606f240f..c0eb7e8fe945e733f47be547b4b4bdc4080f039a 100644 (file)
@@ -246,8 +246,9 @@ void SocketTestCase::UrlTest()
     SocketTestEventLoop loop(ms_useLoop);
 
     wxURL url("http://" + gs_serverHost);
-    wxInputStream * const in = url.GetInputStream();
-    CPPUNIT_ASSERT( in );
+
+    const std::auto_ptr<wxInputStream> in(url.GetInputStream());
+    CPPUNIT_ASSERT( in.get() );
 
     wxStringOutputStream out;
     CPPUNIT_ASSERT_EQUAL( wxSTREAM_EOF, in->Read(out).GetLastError() );