日存档: 5 1 月, 2015

#define CREATE_FUNC(__TYPE__) \
static __TYPE__* create() \
{ \
__TYPE__ *pRet = new __TYPE__(); \
if (pRet && pRet->init()) \
{ \
pRet->autorelease(); \
return pRet; \
} \
else \
{ \
delete pRet; \
pRet = NULL; \
return NULL; \
} \
}

C++标准规定,delete (void*)0;是安全的。
delete NULL也是安全的 无效操作;

解决WordPress访问速度慢问题

wp-includes/script-loader.php中将fonts.googleapis.com和ajax.googleapis.com替换为fonts.useso.com/ajax.useso.com