* 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:
@@ -89,6 +89,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// wxSocket headers
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#include "wx/module.h"
|
||||
#define WXSOCK_INTERNAL
|
||||
#include "wx/sckaddr.h"
|
||||
#include "wx/socket.h"
|
||||
@@ -153,6 +154,17 @@ int PASCAL FAR __WSAFDIsSet(SOCKET fd, fd_set FAR *set)
|
||||
// Some patch ///// END
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// --------------------------------------------------------------
|
||||
// Module
|
||||
// --------------------------------------------------------------
|
||||
class wxSocketModule: public wxModule {
|
||||
DECLARE_DYNAMIC_CLASS(wxSocketModule)
|
||||
public:
|
||||
wxSocketModule() {}
|
||||
bool OnInit();
|
||||
void OnExit();
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------
|
||||
// ClassInfos
|
||||
// --------------------------------------------------------------
|
||||
@@ -162,6 +174,7 @@ IMPLEMENT_CLASS(wxSocketServer, wxSocketBase)
|
||||
IMPLEMENT_CLASS(wxSocketClient, wxSocketBase)
|
||||
IMPLEMENT_CLASS(wxSocketHandler, wxObject)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxSocketEvent, wxEvent)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxSocketModule, wxModule)
|
||||
#endif
|
||||
|
||||
class wxSockWakeUp : public wxTimer {
|
||||
@@ -1543,5 +1556,15 @@ HWND wxSocketHandler::GetHWND() const
|
||||
|
||||
#endif
|
||||
|
||||
bool wxSocketModule::OnInit() {
|
||||
wxSocketHandler::master = new wxSocketHandler();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void wxSocketModule::OnExit() {
|
||||
delete wxSocketHandler::master;
|
||||
wxSocketHandler::master = NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
// __WXSTUBS__
|
||||
|
Reference in New Issue
Block a user