fixing some memleaks

This commit is contained in:
KroArtem
2014-02-09 01:36:32 +04:00
parent 3fdae349b2
commit c4fd2eda08
2 changed files with 8 additions and 1 deletions

View File

@@ -85,6 +85,7 @@ Event::Event(const Event& event)
Event::~Event()
{
delete peer;
peer = NULL;
m_packet = NULL;
}

View File

@@ -51,7 +51,13 @@ STKPeer::~STKPeer()
m_peer = NULL;
if (m_player_profile)
delete m_player_profile;
m_player_profile = NULL;
m_player_profile = NULL;
if (m_client_server_token)
delete m_client_server_token;
m_client_server_token = NULL;
if (m_token_set)
delete m_token_set;
m_token_set = NULL;
}
//-----------------------------------------------------------------------------