mirror of https://github.com/axmolengine/axmol.git
Merge pull request #2851 from dumganhar/master
issue #2271: Fixing some memory leaks. [VS2012] Updating project dependence and warning fixes.
This commit is contained in:
commit
e9f3913766
|
@ -14,6 +14,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "cocos2dx\proj
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblua", "scripting\lua\proj.win32\liblua.vcxproj", "{DDC3E27F-004D-4DD4-9DD3-931A013D2159}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{21B2C324-891F-48EA-AD1A-5AE13DE12E28} = {21B2C324-891F-48EA-AD1A-5AE13DE12E28}
|
||||
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}
|
||||
{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}
|
||||
EndProjectSection
|
||||
|
|
|
@ -39,13 +39,12 @@ class CCArmatureDataManager : public CCObject
|
|||
{
|
||||
public:
|
||||
static CCArmatureDataManager *sharedArmatureDataManager();
|
||||
static void purgeArmatureSystem();
|
||||
private:
|
||||
CCArmatureDataManager(void);
|
||||
~CCArmatureDataManager(void);
|
||||
|
||||
public:
|
||||
virtual void purgeArmatureSystem();
|
||||
|
||||
/**
|
||||
* Init CCArmatureDataManager
|
||||
*/
|
||||
|
|
|
@ -222,7 +222,6 @@ void WsThreadHelper::update(float dt)
|
|||
enum WS_MSG {
|
||||
WS_MSG_TO_SUBTRHEAD_SENDING_STRING = 0,
|
||||
WS_MSG_TO_SUBTRHEAD_SENDING_BINARY,
|
||||
WS_MSG_TO_SUBTRHEAD_CLOSING,
|
||||
WS_MSG_TO_UITHREAD_OPEN,
|
||||
WS_MSG_TO_UITHREAD_MESSAGE,
|
||||
WS_MSG_TO_UITHREAD_ERROR,
|
||||
|
@ -381,10 +380,6 @@ void WebSocket::close()
|
|||
CCLOG("websocket (%p) connection closed by client", this);
|
||||
_readyState = kStateClosed;
|
||||
|
||||
WsMessage* msg = new WsMessage();
|
||||
msg->what = WS_MSG_TO_SUBTRHEAD_CLOSING;
|
||||
|
||||
_wsHelper->sendMessageToSubThread(msg);
|
||||
_wsHelper->joinSubThread();
|
||||
|
||||
// onClose callback needs to be invoked at the end of this method
|
||||
|
@ -481,20 +476,26 @@ int WebSocket::onSocketCallback(struct libwebsocket_context *ctx,
|
|||
case LWS_CALLBACK_PROTOCOL_DESTROY:
|
||||
case LWS_CALLBACK_CLIENT_CONNECTION_ERROR:
|
||||
{
|
||||
WsMessage* msg = new WsMessage();
|
||||
WsMessage* msg = NULL;
|
||||
if (reason == LWS_CALLBACK_CLIENT_CONNECTION_ERROR
|
||||
|| (reason == LWS_CALLBACK_PROTOCOL_DESTROY && _readyState == kStateConnecting)
|
||||
|| (reason == LWS_CALLBACK_DEL_POLL_FD && _readyState == kStateConnecting)
|
||||
)
|
||||
{
|
||||
msg = new WsMessage();
|
||||
msg->what = WS_MSG_TO_UITHREAD_ERROR;
|
||||
_readyState = kStateClosing;
|
||||
}
|
||||
else if (reason == LWS_CALLBACK_PROTOCOL_DESTROY && _readyState == kStateClosing)
|
||||
{
|
||||
msg = new WsMessage();
|
||||
msg->what = WS_MSG_TO_UITHREAD_CLOSE;
|
||||
}
|
||||
_wsHelper->sendMessageToUIThread(msg);
|
||||
|
||||
if (msg)
|
||||
{
|
||||
_wsHelper->sendMessageToUIThread(msg);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LWS_CALLBACK_CLIENT_ESTABLISHED:
|
||||
|
|
|
@ -23,7 +23,7 @@ AppDelegate::AppDelegate()
|
|||
|
||||
AppDelegate::~AppDelegate()
|
||||
{
|
||||
CCScriptEngineManager::sharedManager()->purgeSharedManager();
|
||||
CCScriptEngineManager::purgeSharedManager();
|
||||
}
|
||||
|
||||
bool AppDelegate::applicationDidFinishLaunching()
|
||||
|
|
|
@ -23,7 +23,7 @@ AppDelegate::AppDelegate()
|
|||
|
||||
AppDelegate::~AppDelegate()
|
||||
{
|
||||
CCScriptEngineManager::sharedManager()->purgeSharedManager();
|
||||
CCScriptEngineManager::purgeSharedManager();
|
||||
}
|
||||
|
||||
bool AppDelegate::applicationDidFinishLaunching()
|
||||
|
|
|
@ -1400,11 +1400,11 @@ void ActionMoveStacked::runActionsInSprite(CCSprite *sprite)
|
|||
sprite->runAction(
|
||||
CCRepeatForever::create(
|
||||
CCSequence::create(
|
||||
CCMoveBy::create(0.05, ccp(10,10)),
|
||||
CCMoveBy::create(0.05, ccp(-10,-10)),
|
||||
CCMoveBy::create(0.05f, ccp(10,10)),
|
||||
CCMoveBy::create(0.05f, ccp(-10,-10)),
|
||||
NULL)));
|
||||
|
||||
CCMoveBy* action = CCMoveBy::create(2, ccp(400,0));
|
||||
CCMoveBy* action = CCMoveBy::create(2.0f, ccp(400,0));
|
||||
CCMoveBy* action_back = (CCMoveBy*)action->reverse();
|
||||
|
||||
sprite->runAction(
|
||||
|
@ -1426,11 +1426,11 @@ void ActionMoveJumpStacked::runActionsInSprite(CCSprite *sprite)
|
|||
sprite->runAction(
|
||||
CCRepeatForever::create(
|
||||
CCSequence::create(
|
||||
CCMoveBy::create(0.05, ccp(10,2)),
|
||||
CCMoveBy::create(0.05, ccp(-10,-2)),
|
||||
CCMoveBy::create(0.05f, ccp(10,2)),
|
||||
CCMoveBy::create(0.05f, ccp(-10,-2)),
|
||||
NULL)));
|
||||
|
||||
CCJumpBy* jump = CCJumpBy::create(2, ccp(400,0), 100, 5);
|
||||
CCJumpBy* jump = CCJumpBy::create(2.0f, ccp(400,0), 100, 5);
|
||||
CCJumpBy* jump_back = (CCJumpBy*)jump->reverse();
|
||||
|
||||
sprite->runAction(
|
||||
|
@ -1465,8 +1465,8 @@ void ActionMoveBezierStacked::runActionsInSprite(CCSprite *sprite)
|
|||
sprite->runAction(
|
||||
CCRepeatForever::create(
|
||||
CCSequence::create(
|
||||
CCMoveBy::create(0.05, ccp(10,0)),
|
||||
CCMoveBy::create(0.05, ccp(-10,0)),
|
||||
CCMoveBy::create(0.05f, ccp(10,0)),
|
||||
CCMoveBy::create(0.05f, ccp(-10,0)),
|
||||
NULL)));
|
||||
}
|
||||
|
||||
|
@ -1516,8 +1516,8 @@ void ActionCatmullRomStacked::onEnter()
|
|||
m_tamara->runAction(
|
||||
CCRepeatForever::create(
|
||||
CCSequence::create(
|
||||
CCMoveBy::create(0.05, ccp(10,0)),
|
||||
CCMoveBy::create(0.05, ccp(-10,0)),
|
||||
CCMoveBy::create(0.05f, ccp(10,0)),
|
||||
CCMoveBy::create(0.05f, ccp(-10,0)),
|
||||
NULL)));
|
||||
|
||||
|
||||
|
@ -1548,8 +1548,8 @@ void ActionCatmullRomStacked::onEnter()
|
|||
m_kathia->runAction(
|
||||
CCRepeatForever::create(
|
||||
CCSequence::create(
|
||||
CCMoveBy::create(0.05, ccp(10,0)),
|
||||
CCMoveBy::create(0.05, ccp(-10,0)),
|
||||
CCMoveBy::create(0.05f, ccp(10,0)),
|
||||
CCMoveBy::create(0.05f, ccp(-10,0)),
|
||||
NULL)));
|
||||
|
||||
|
||||
|
@ -1626,8 +1626,8 @@ void ActionCardinalSplineStacked::onEnter()
|
|||
m_tamara->runAction(
|
||||
CCRepeatForever::create(
|
||||
CCSequence::create(
|
||||
CCMoveBy::create(0.05, ccp(10,0)),
|
||||
CCMoveBy::create(0.05, ccp(-10,0)),
|
||||
CCMoveBy::create(0.05f, ccp(10,0)),
|
||||
CCMoveBy::create(0.05f, ccp(-10,0)),
|
||||
NULL)));
|
||||
|
||||
|
||||
|
@ -1649,8 +1649,8 @@ void ActionCardinalSplineStacked::onEnter()
|
|||
m_kathia->runAction(
|
||||
CCRepeatForever::create(
|
||||
CCSequence::create(
|
||||
CCMoveBy::create(0.05, ccp(10,0)),
|
||||
CCMoveBy::create(0.05, ccp(-10,0)),
|
||||
CCMoveBy::create(0.05f, ccp(10,0)),
|
||||
CCMoveBy::create(0.05f, ccp(-10,0)),
|
||||
NULL)));
|
||||
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ AppDelegate::AppDelegate()
|
|||
AppDelegate::~AppDelegate()
|
||||
{
|
||||
// SimpleAudioEngine::end();
|
||||
cocos2d::extension::CCArmatureDataManager::sharedArmatureDataManager()->purgeArmatureSystem();
|
||||
cocos2d::extension::CCArmatureDataManager::purgeArmatureSystem();
|
||||
}
|
||||
|
||||
bool AppDelegate::applicationDidFinishLaunching()
|
||||
|
|
|
@ -23,7 +23,7 @@ AppDelegate::AppDelegate()
|
|||
|
||||
AppDelegate::~AppDelegate()
|
||||
{
|
||||
CCScriptEngineManager::sharedManager()->purgeSharedManager();
|
||||
CCScriptEngineManager::purgeSharedManager();
|
||||
}
|
||||
|
||||
bool AppDelegate::applicationDidFinishLaunching()
|
||||
|
|
|
@ -19,7 +19,7 @@ AppDelegate::AppDelegate()
|
|||
|
||||
AppDelegate::~AppDelegate()
|
||||
{
|
||||
CCScriptEngineManager::sharedManager()->purgeSharedManager();
|
||||
CCScriptEngineManager::purgeSharedManager();
|
||||
}
|
||||
|
||||
bool AppDelegate::applicationDidFinishLaunching()
|
||||
|
|
|
@ -15,7 +15,7 @@ AppDelegate::AppDelegate()
|
|||
|
||||
AppDelegate::~AppDelegate()
|
||||
{
|
||||
CCScriptEngineManager::sharedManager()->purgeSharedManager();
|
||||
CCScriptEngineManager::purgeSharedManager();
|
||||
}
|
||||
|
||||
bool AppDelegate::applicationDidFinishLaunching()
|
||||
|
|
|
@ -23,7 +23,7 @@ AppDelegate::AppDelegate()
|
|||
|
||||
AppDelegate::~AppDelegate()
|
||||
{
|
||||
CCScriptEngineManager::sharedManager()->purgeSharedManager();
|
||||
CCScriptEngineManager::purgeSharedManager();
|
||||
}
|
||||
|
||||
bool AppDelegate::applicationDidFinishLaunching()
|
||||
|
|
|
@ -21,7 +21,7 @@ AppDelegate::AppDelegate()
|
|||
|
||||
AppDelegate::~AppDelegate()
|
||||
{
|
||||
CCScriptEngineManager::sharedManager()->purgeSharedManager();
|
||||
CCScriptEngineManager::purgeSharedManager();
|
||||
}
|
||||
|
||||
bool AppDelegate::applicationDidFinishLaunching()
|
||||
|
|
|
@ -23,7 +23,7 @@ AppDelegate::AppDelegate()
|
|||
|
||||
AppDelegate::~AppDelegate()
|
||||
{
|
||||
CCScriptEngineManager::sharedManager()->purgeSharedManager();
|
||||
CCScriptEngineManager::purgeSharedManager();
|
||||
}
|
||||
|
||||
bool AppDelegate::applicationDidFinishLaunching()
|
||||
|
|
Loading…
Reference in New Issue