From 1f30c75e44a723ab463e1124ce0b706930432b07 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 30 Dec 2008 13:18:22 +0000 Subject: [PATCH] fix memory leak in URL test git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- tests/net/socket.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/net/socket.cpp b/tests/net/socket.cpp index a34993bc7b..c0eb7e8fe9 100644 --- a/tests/net/socket.cpp +++ b/tests/net/socket.cpp @@ -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 in(url.GetInputStream()); + CPPUNIT_ASSERT( in.get() ); wxStringOutputStream out; CPPUNIT_ASSERT_EQUAL( wxSTREAM_EOF, in->Read(out).GetLastError() );