fixed some mem leaks. Models are only released when program exits so restarting a level results in leaks because they are loaded again.
This commit is contained in:
parent
2b8dbee5f6
commit
91d1186c93
|
@ -12,7 +12,7 @@
|
||||||
#include "Utilities.h"
|
#include "Utilities.h"
|
||||||
#include <Protocols.h>
|
#include <Protocols.h>
|
||||||
#include "NetworkClient.h"
|
#include "NetworkClient.h"
|
||||||
#include <GameServerAPI.h>
|
//#include <GameServerAPI.h>
|
||||||
|
|
||||||
#include "../WindowManager/WindowShell.h"
|
#include "../WindowManager/WindowShell.h"
|
||||||
#include "WinTimer.h"
|
#include "WinTimer.h"
|
||||||
|
@ -185,11 +185,11 @@ namespace DanBias
|
||||||
|
|
||||||
DanBiasGame::Result DanBiasGame::Update(float deltaTime)
|
DanBiasGame::Result DanBiasGame::Update(float deltaTime)
|
||||||
{
|
{
|
||||||
if( data.serverOwner )
|
/*if( data.serverOwner )
|
||||||
{
|
{
|
||||||
DanBias::GameServerAPI::ServerUpdate();
|
DanBias::GameServerAPI::ServerUpdate();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
DanBias::Client::GameClientState::ClientState state = DanBias::Client::GameClientState::ClientState_Same;
|
DanBias::Client::GameClientState::ClientState state = DanBias::Client::GameClientState::ClientState_Same;
|
||||||
state = data.state->Update( deltaTime );
|
state = data.state->Update( deltaTime );
|
||||||
|
|
||||||
|
@ -264,7 +264,7 @@ namespace DanBias
|
||||||
EventHandler::Instance().Clean();
|
EventHandler::Instance().Clean();
|
||||||
Graphics::API::Clean();
|
Graphics::API::Clean();
|
||||||
|
|
||||||
GameServerAPI::ServerStop();
|
//GameServerAPI::ServerStop();
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include <Protocols.h>
|
#include <Protocols.h>
|
||||||
#include "NetworkClient.h"
|
#include "NetworkClient.h"
|
||||||
#include "Camera_FPSV2.h"
|
#include "Camera_FPSV2.h"
|
||||||
#include <GameServerAPI.h>
|
//#include <GameServerAPI.h>
|
||||||
#include "C_Light.h"
|
#include "C_Light.h"
|
||||||
#include "C_obj/C_Player.h"
|
#include "C_obj/C_Player.h"
|
||||||
#include "C_obj/C_DynamicObj.h"
|
#include "C_obj/C_DynamicObj.h"
|
||||||
|
|
|
@ -41,7 +41,8 @@ GameSession::GameSession()
|
||||||
this->networkTimer.reset();
|
this->networkTimer.reset();
|
||||||
this->logicTimer.reset();
|
this->logicTimer.reset();
|
||||||
|
|
||||||
memset(&this->description, 0, sizeof(GameDescription));
|
// HACK to avoid mem leaks
|
||||||
|
//memset(&this->description, 0, sizeof(GameDescription));
|
||||||
}
|
}
|
||||||
|
|
||||||
GameSession::~GameSession()
|
GameSession::~GameSession()
|
||||||
|
|
Loading…
Reference in New Issue