* 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

@@ -270,7 +270,6 @@ class WXDLLEXPORT wxSocketHandler : public wxObject
{
DECLARE_CLASS(wxSocketHandler)
protected:
static wxSocketHandler *master;
#if defined(__WINDOWS__)
wxList *smsg_list;
struct wxSockHandlerInternal *internal;
@@ -280,6 +279,7 @@ protected:
public:
enum SockStatus { SOCK_NONE, SOCK_DATA, SOCK_CONNECT, SOCK_DISCONNECT,
SOCK_ERROR };
static wxSocketHandler *master;
wxSocketHandler();
virtual ~wxSocketHandler();
@@ -303,8 +303,7 @@ public:
(wxSocketBase::wxSockFlags flags = wxSocketBase::NONE);
// Create or reuse a socket handler
static wxSocketHandler& Master()
{ return *((master) ? (master) : (master = new wxSocketHandler())); }
static wxSocketHandler& Master() { return *master; }
#if defined(WXSOCK_INTERNAL) && defined(__WINDOWS__)

View File

@@ -36,7 +36,7 @@ class WXDLLEXPORT wxURL : public wxObject {
DECLARE_DYNAMIC_CLASS(wxURL)
protected:
static wxProtoInfo *g_protocols;
static wxHTTP g_proxy;
static wxHTTP *g_proxy;
wxProtoInfo *m_protoinfo;
wxProtocol *m_protocol;
wxHTTP m_proxy;
@@ -52,6 +52,7 @@ protected:
bool FetchProtocol();
friend class wxProtoInfo;
friend class wxProtocolModule;
public:
wxURL(const wxString& url);