void swoole_clean(void) { //释放全局内存 if (SwooleG.memory_pool != NULL) { SwooleG.memory_pool->destroy(SwooleG.memory_pool); SwooleG.memory_pool = NULL; if (SwooleG.timer.fd > 0) { swTimer_free(&SwooleG.timer); } bzero(&SwooleG, sizeof(SwooleG)); } }
void swoole_clean(void) { //free the global memory if (SwooleG.memory_pool != NULL) { if (SwooleG.timer.fd > 0) { swTimer_free(&SwooleG.timer); } if (SwooleG.main_reactor) { SwooleG.main_reactor->free(SwooleG.main_reactor); } SwooleG.memory_pool->destroy(SwooleG.memory_pool); bzero(&SwooleG, sizeof(SwooleG)); } }