Example #1
0
EditorDetailMenu::~EditorDetailMenu()
{
    CC_SAFE_RELEASE_NULL(m_pNodeCor);
}
Example #2
0
void CCShaderCache::purgeSharedShaderCache()
{
    CC_SAFE_RELEASE_NULL(_sharedShaderCache);
}
Example #3
0
IFSkeletonNode::~IFSkeletonNode()
{
	CC_SAFE_RELEASE_NULL(m_callBack);
}
Example #4
0
BarPipe::~BarPipe() {
    
    CC_SAFE_RELEASE_NULL(upBar);
    CC_SAFE_RELEASE_NULL(downBar);
}
Example #5
0
AtlasPage::~AtlasPage () {
    CC_SAFE_RELEASE_NULL(texture);
    CC_SAFE_RELEASE_NULL(atlas);
}
Example #6
0
Background::~Background()
{
    CC_SAFE_RELEASE_NULL(m_bgs);
}
Example #7
0
CASwitch::~CASwitch()
{
    CC_SAFE_RELEASE_NULL(m_onImage);
	CC_SAFE_RELEASE_NULL(m_offImage);
	CC_SAFE_RELEASE_NULL(m_thumbTintImage);
}
Example #8
0
CAListViewCell::~CAListViewCell()
{
    CC_SAFE_RELEASE_NULL(m_pContentView);
    CC_SAFE_RELEASE_NULL(m_pBackgroundView);
}
Example #9
0
ListOrganizer::~ListOrganizer()
{
	CC_SAFE_RELEASE_NULL(m_elements);
}
void GLProgramCache::destroyInstance()
{
    CC_SAFE_RELEASE_NULL(_sharedGLProgramCache);
}
Example #11
0
void VideoTextureCache::purgeSharedTextureCache()
{
    CC_SAFE_RELEASE_NULL(g_sharedTextureCache);
}
Example #12
0
Fire::~Fire(){
    CC_SAFE_RELEASE_NULL(m_flyAction);
    CC_SAFE_RELEASE_NULL(m_endAction);
}
QuestionCounterNode::~QuestionCounterNode()
{
    CC_SAFE_RELEASE_NULL(this->m_target);
}
Example #14
0
TerrainTest::~TerrainTest(void)
{
    CC_SAFE_RELEASE_NULL(_stripes);
}
Example #15
0
ArmatureAnimation::~ArmatureAnimation(void)
{
    CC_SAFE_RELEASE_NULL(_animationData);

    CC_SAFE_RELEASE_NULL(_userObject);
}
Example #16
0
CATabBarItem::~CATabBarItem()
{
    CC_SAFE_RELEASE_NULL(m_pSelectedImage);
}
Example #17
0
Layout::~Layout()
{
    CC_SAFE_RELEASE_NULL(m_pLayoutExecutant);
}
Example #18
0
CABarItem::~CABarItem()
{
    CC_SAFE_RELEASE_NULL(m_pImage);
}
Example #19
0
void RenderState::finalize()
{
    CC_SAFE_RELEASE_NULL(StateBlock::_defaultState);
}
Example #20
0
CABarButtonItem::~CABarButtonItem()
{
    CC_SAFE_RELEASE_NULL(m_pHighlightedImage);
}
Example #21
0
GameLayer::~GameLayer() {
    
    CC_SAFE_RELEASE_NULL(mGrounds);
    CC_SAFE_RELEASE_NULL(mCollisionArray);
}
Example #22
0
CANavigationBarItem::~CANavigationBarItem()
{
    CC_SAFE_RELEASE_NULL(m_pTitleViewImage);
    CC_SAFE_RELEASE_NULL(m_pLeftButtonItem);
    CC_SAFE_RELEASE_NULL(m_pRightButtonItem);
}
Example #23
0
AnimationsTestLayer::~AnimationsTestLayer()
{
    CC_SAFE_RELEASE_NULL(mAnimationManager);
}
Example #24
0
void UnitScript::UnitScriptImpl::updateMovingActionForPath(const MovingPath & path)
{
	CC_SAFE_RELEASE_NULL(m_MovingAction);
	m_MovingAction = _createMovingActionForPath(path);
	m_MovingAction->retain();
}
void ccDrawFree()
{
    CC_SAFE_RELEASE_NULL(s_pShader);
    s_bInitialized = false;
}
Example #26
0
UnitScript::UnitScriptImpl::~UnitScriptImpl()
{
	CC_SAFE_RELEASE_NULL(m_MovingAction);
}
Example #27
0
void IFSkeletonNode::cleanup()
{
    CC_SAFE_RELEASE_NULL(m_callBack);
    CCNode::cleanup();
}
Example #28
0
void Configuration::destroyInstance()
{
    CC_SAFE_RELEASE_NULL(s_sharedConfiguration);
}
Example #29
0
cocos2d::Node* SceneReader::createObject(CocoLoader *cocoLoader, stExpCocoNode *cocoNode, cocos2d::Node* parent, AttachComponentType attachComponent)
{
    const char *className = nullptr;
    stExpCocoNode *pNodeArray = cocoNode->GetChildArray(cocoLoader);
    std::string Key = pNodeArray[1].GetName(cocoLoader);
    if (Key == "classname")
    {
        className = pNodeArray[1].GetValue(cocoLoader);
    }
    if(strcmp(className, "CCNode") == 0)
    {
        Node* gb = nullptr;
        std::vector<Component*> _vecComs;
        ComRender *pRender = nullptr;
        int count = 0;
        std::string key = pNodeArray[13].GetName(cocoLoader);
        if (key == "components")
        {
            count = pNodeArray[13].GetChildNum();
        }
        stExpCocoNode *pComponents = pNodeArray[13].GetChildArray(cocoLoader);
        SerData *data = new (std::nothrow) SerData();
        for (int i = 0; i < count; ++i)
        {
            stExpCocoNode *subDict = pComponents[i].GetChildArray(cocoLoader);
            if (subDict == nullptr)
            {
                continue;
            }
            std::string key1 = subDict[1].GetName(cocoLoader);
            const char *comName = subDict[1].GetValue(cocoLoader);
            Component *pCom = nullptr;
            if (key1 == "classname" && comName != nullptr)
            {
                pCom = createComponent(comName);
            }
            CCLOG("classname = %s", comName);
            if (pCom != nullptr)
            {
                data->_rData = nullptr;
                data->_cocoNode = subDict;
                data->_cocoLoader = cocoLoader;
                if (pCom->serialize(data))
                {
                    ComRender *pTRender = dynamic_cast<ComRender*>(pCom);
                    if (pTRender != nullptr)
                    {
                        pRender = pTRender;
                    }
                    else
                    {
                        _vecComs.push_back(pCom);
                    }
                }
                else
                {
                    CC_SAFE_RELEASE_NULL(pCom);
                }
            }
            if(_fnSelector != nullptr)
            {
                _fnSelector(pCom, (void*)(data));
            }
        }
        CC_SAFE_DELETE(data);
        
        if (parent != nullptr)
        {
            if (pRender == nullptr || attachComponent == AttachComponentType::EMPTY_NODE)
            {
                gb = CCNode::create();
                if (pRender != nullptr)
                {
                    _vecComs.push_back(pRender);
                }
            }
            else
            {
                gb = pRender->getNode();
                gb->retain();
                pRender->setNode(nullptr);
                CC_SAFE_RELEASE_NULL(pRender);
            }
            parent->addChild(gb);
        }
        setPropertyFromJsonDict(cocoLoader, cocoNode, gb);
        for (std::vector<Component*>::iterator iter = _vecComs.begin(); iter != _vecComs.end(); ++iter)
        {
            gb->addComponent(*iter);
        }
        
        stExpCocoNode *pGameObjects = pNodeArray[12].GetChildArray(cocoLoader);
        if (pGameObjects != nullptr)
        {
            int length = pNodeArray[12].GetChildNum();
            for (int i = 0; i < length; ++i)
            {
                createObject(cocoLoader, &pGameObjects[i], gb, attachComponent);
            }
        }
        return gb;
    }
    return nullptr;
}
Example #30
0
CATouchDispatcher::~CATouchDispatcher(void)
{
    CC_SAFE_RELEASE_NULL(m_pFirstResponder);
}