看了下Configuration, 好像和s_SharedDirector没什么关系,也许在什么地方进行删除操作,但我没发现
=================================================================
Configuration::Configuration()
: _maxTextureSize(0)
, _maxModelviewStackDepth(0)
, _supportsPVRTC(false)
, _supportsETC1(false)
, _supportsS3TC(false)
, _supportsATITC(false)
, _supportsNPOT(false)
, _supportsBGRA8888(false)
, _supportsDiscardFramebuffer(false)
, _supportsShareableVAO(false)
, _maxSamplesAllowed(0)
, _maxTextureUnits(0)
, _glExtensions(nullptr)
{
}
bool Configuration::init()
{
_valueDict"cocos2d.x.version"] = Value(cocos2dVersion());
#if CC_ENABLE_PROFILERS
_valueDict"cocos2d.x.compiled_with_profiler"] = Value(true);
#else
_valueDict"cocos2d.x.compiled_with_profiler"] = Value(false);
#endif
#if CC_ENABLE_GL_STATE_CACHE == 0
_valueDict"cocos2d.x.compiled_with_gl_state_cache"] = Value(false);
#else
_valueDict"cocos2d.x.compiled_with_gl_state_cache"] = Value(true);
#endif
#if COCOS2D_DEBUG
_valueDict"cocos2d.x.build_type"] = Value(“DEBUG”);
#else
_valueDict"cocos2d.x.build_type"] = Value(“RELEASE”);
#endif
return true;
}
Configuration::~Configuration()
{
}
Configuration* Configuration::getInstance()
{
if (! s_sharedConfiguration)
{
s_sharedConfiguration = new Configuration();
s_sharedConfiguration->init();
}
return s_sharedConfiguration;
}
void Configuration::destroyInstance()
{
CC_SAFE_RELEASE_NULL(s_sharedConfiguration);
}
============================================================