Deallocate memory from pool using the correct function