FreeSWITCH API Documentation  1.7.0
Functions
Memory Pool Functions
+ Collaboration diagram for Memory Pool Functions:

Functions

void switch_pool_clear (switch_memory_pool_t *pool)
 

Detailed Description

Function Documentation

void switch_pool_clear ( switch_memory_pool_t pool)

The fundamental pool type Clear all memory in the pool and run all the cleanups. This also destroys all subpools.

Parameters
poolThe pool to clear
Remarks
This does not actually free the memory, it just allows the pool to re-use this memory for the next allocation.
See also
apr_pool_destroy()

Definition at line 325 of file switch_core_memory.c.

326 {
327 #ifdef PER_POOL_LOCK
328  apr_thread_mutex_t *my_mutex;
329  apr_pool_mutex_set(p, NULL);
330 #endif
331 
332  apr_pool_clear(p);
333 
334 #ifdef PER_POOL_LOCK
335 
336  if ((apr_thread_mutex_create(&my_mutex, APR_THREAD_MUTEX_NESTED, p)) != APR_SUCCESS) {
337  abort();
338  }
339 
340  apr_pool_mutex_set(p, my_mutex);
341 
342 #endif
343 
344 }