From 5404fd879bea37854a1dbaac2cf2bf5580128ecc Mon Sep 17 00:00:00 2001 From: Ming Date: Wed, 4 Aug 2010 08:50:51 +0000 Subject: [PATCH] issue #6: initialize m_pLastUpdate --- cocos2dx/CCDirector.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cocos2dx/CCDirector.cpp b/cocos2dx/CCDirector.cpp index fdf4ec29c2..4bc6a34279 100644 --- a/cocos2dx/CCDirector.cpp +++ b/cocos2dx/CCDirector.cpp @@ -132,6 +132,8 @@ CCDirector* CCDirector::init(void) m_fContentScaleFactor = 1; m_obScreenSize = m_obSurfaceSize = CGSizeZero; + m_pLastUpdate = new struct cc_timeval(); + // create autorelease pool NSPoolManager::getInstance()->push(); @@ -154,6 +156,10 @@ CCDirector::~CCDirector(void) NSPoolManager::getInstance()->pop(); pobSharedDirector = NULL; + + // delete m_pLastUpdate + delete m_pLastUpdate; + m_pLastUpdate = NULL; } void CCDirector::setGLDefaultValues(void)