* 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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user