From fb5762c4636bc0866597d2c03f3144e3eda1b9f8 Mon Sep 17 00:00:00 2001 From: Ming Date: Mon, 12 Jul 2010 09:12:08 +0000 Subject: [PATCH] issue #6: update NSObject.cpp --- cocos2dx/cocoa/NSObject.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cocos2dx/cocoa/NSObject.cpp b/cocos2dx/cocoa/NSObject.cpp index 9cd192fd42..5364b910a4 100644 --- a/cocos2dx/cocoa/NSObject.cpp +++ b/cocos2dx/cocoa/NSObject.cpp @@ -24,6 +24,7 @@ THE SOFTWARE. #include "NSObject.h" +#include "NSAutoreleasePool.h" #include NSObject* CCCopying::copyWithZone(NSZone *pZone) @@ -50,7 +51,7 @@ NSObject::~NSObject(void) // from pool manager if (m_bManaged) { - // todo: remove from pool manager + NSPoolManager::getInstance()->removeObject(this); } } @@ -79,7 +80,7 @@ void NSObject::retain(void) NSObject* NSObject::autorelease(void) { - // todo add to pool manager + NSPoolManager::getInstance()->addObject(this); m_bManaged = true; return this;