patch from Dimitri fixing a few memory leaks and unTABbing the sources
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -60,7 +60,7 @@ char ipc_buffer[4000];
|
||||
wxListBox *the_list = NULL;
|
||||
|
||||
MyConnection *the_connection = NULL;
|
||||
MyClient *my_client ;
|
||||
MyClient *my_client;
|
||||
|
||||
// ============================================================================
|
||||
// implementation
|
||||
@@ -121,11 +121,17 @@ int MyApp::OnExit()
|
||||
if (the_connection)
|
||||
{
|
||||
the_connection->Disconnect();
|
||||
delete the_connection;
|
||||
the_connection = NULL;
|
||||
}
|
||||
|
||||
// will delete the connection too
|
||||
// Update: Seems it didn't delete the_connection, because there's a leak.
|
||||
// Deletion is now explicitly done a few lines up.
|
||||
delete my_client;
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -207,11 +213,6 @@ MyConnection::MyConnection()
|
||||
{
|
||||
}
|
||||
|
||||
MyConnection::~MyConnection()
|
||||
{
|
||||
the_connection = NULL;
|
||||
}
|
||||
|
||||
bool MyConnection::OnAdvise(const wxString& topic, const wxString& item, char *data, int size, wxIPCFormat format)
|
||||
{
|
||||
if (the_list)
|
||||
|
Reference in New Issue
Block a user