#ifndef __CC_PLATFORM_THREAD_H__
#define __CC_PLATFORM_THREAD_H__
#include "CCCommon.h"
#include "CCPlatformMacros.h"
NS_CC_BEGIN
/* On iOS, should create autorelease pool when create a new thread
* and release it when the thread end.
*/
class CC_DLL CCThread
{
public:
CCThread() : m_pAutoreasePool(0) {}
~CCThread();
{
[(id)m_pAutoreasePool release];
}
void createAutoreleasePool();
{
m_pAutoreasePool = [[NSAutoreleasePool alloc] init];
}
private:
void *m_pAutoreasePool;
};
NS_CC_END
#endif