* Fixed some "memory leak"

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Guilhem Lavaux
1998-11-28 18:36:47 +00:00
parent 4fabb57533
commit 3b4183d82b
5 changed files with 61 additions and 9 deletions

View File

@@ -26,6 +26,7 @@
#include "wx/protocol/protocol.h"
#include "wx/url.h"
#include "wx/module.h"
/////////////////////////////////////////////////////////////////
// wxProtoInfo
@@ -108,3 +109,31 @@ wxProtocolError GetLine(wxSocketBase *sock, wxString& result) {
return wxPROTO_NOERR;
#undef PROTO_BSIZE
}
// ----------------------------------------------------------------------
// Module
// ----------------------------------------------------------------------
class wxProtocolModule: public wxModule {
DECLARE_DYNAMIC_CLASS(wxProtocolModule)
public:
wxProtocolModule() {}
bool OnInit();
void OnExit();
};
#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxProtocolModule, wxModule)
#endif
bool wxProtocolModule::OnInit()
{
wxURL::g_proxy = new wxHTTP();
return TRUE;
}
void wxProtocolModule::OnExit()
{
delete wxURL::g_proxy;
wxURL::g_proxy = NULL;
}