2014年2月28日 星期五

CCParticleSystemQuad crash Cocos2d V1.1-rc0

移除粒子系統2d框架的bug



修改CCScheduler.m


找到 - (void) removeUpdateFromHash:(tListEntry*)entry

tHashUpdateEntry * element = NULL;
    
    HASH_FIND_INT(hashForUpdates, &entry->target, element);
    if( element ) {
        // list entry
        DL_DELETE( *element->list, element->entry );
        free( element->entry );
        
        // hash entry
        id target = element->target;
        HASH_DEL( hashForUpdates, element);
        free(element);
        
        // target#release should be the last one to prevent
        // a possible double-free. eg: If the [target dealloc] might want to remove it itself from there
        [target release];
    }

沒有留言:

張貼留言