fix memory leak in URL test

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2008-12-30 13:18:22 +00:00
parent 16685812c1
commit 1f30c75e44

View 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() );