mirror of https://github.com/axmolengine/axmol.git
issue #6: update NSObject.cpp
This commit is contained in:
parent
d2522eb541
commit
fb5762c463
|
@ -24,6 +24,7 @@ THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
#include "NSObject.h"
|
#include "NSObject.h"
|
||||||
|
#include "NSAutoreleasePool.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
NSObject* CCCopying::copyWithZone(NSZone *pZone)
|
NSObject* CCCopying::copyWithZone(NSZone *pZone)
|
||||||
|
@ -50,7 +51,7 @@ NSObject::~NSObject(void)
|
||||||
// from pool manager
|
// from pool manager
|
||||||
if (m_bManaged)
|
if (m_bManaged)
|
||||||
{
|
{
|
||||||
// todo: remove from pool manager
|
NSPoolManager::getInstance()->removeObject(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +80,7 @@ void NSObject::retain(void)
|
||||||
|
|
||||||
NSObject* NSObject::autorelease(void)
|
NSObject* NSObject::autorelease(void)
|
||||||
{
|
{
|
||||||
// todo add to pool manager
|
NSPoolManager::getInstance()->addObject(this);
|
||||||
|
|
||||||
m_bManaged = true;
|
m_bManaged = true;
|
||||||
return this;
|
return this;
|
||||||
|
|
Loading…
Reference in New Issue