improve memory pool
1. fix memory leak: `memset(&pool_p, 0, sizeof(pool_p))` sets the pointer to NULL, so `free(pool_p)` does nothing. 2. improve performance by move some code to the outside of the lock.
Showing
想要评论请 注册 或 登录
1. fix memory leak: `memset(&pool_p, 0, sizeof(pool_p))` sets the pointer to NULL, so `free(pool_p)` does nothing. 2. improve performance by move some code to the outside of the lock.