FOR C++ best practice£¬static variable should be in anonymous namespace.
It's not an exported global variable.

- James
ÔÚ 2013-9-10 ÉÏÎç10:07£¬"Zhe Wang" <notifications@github.com>Ð´µÀ£º

> In cocos2dx/event_dispatcher/CCEventDispatcher.cpp:
>
> > +//  CCEventDispatcher.cpp
> > +//  cocos2d_libs
> > +//
> > +//  Created by James Chen on 8/30/13.
> > +//
> > +//
> > +
> > +#include "CCEventDispatcher.h"
> > +#include "CCTouchEvent.h"
> > +#include "CCDirector.h"
> > +
> > +NS_CC_BEGIN
> > +
> > +namespace {
> > +
> > +EventDispatcher _instance;
>
> Don't use global instance. Move into cc::Director as a pointer member.
>
> ¡ª
> Reply to this email directly or view it on GitHub<https://github.com/cocos2d/cocos2d-x/pull/3532/files#r6256261>
> .
>