Changeset 5533


Ignore:
Timestamp:
Jan 19, 2017 6:10:15 AM (2 years ago)
Author:
nanang
Message:

Close #1513: Added pj_pool_safe_release() API.

Location:
pjproject/trunk/pjlib/include/pj
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/include/pj/pool.h

    r4537 r5533  
    391391PJ_IDECL(void) pj_pool_release( pj_pool_t *pool ); 
    392392 
     393 
     394/** 
     395 * Release the pool back to pool factory and set the pool pointer to zero. 
     396 * 
     397 * @param ppool     Pointer to memory pool. 
     398 */ 
     399PJ_IDECL(void) pj_pool_safe_release( pj_pool_t **ppool ); 
     400 
     401 
    393402/** 
    394403 * Get pool object name. 
  • pjproject/trunk/pjlib/include/pj/pool_i.h

    r4298 r5533  
    9393} 
    9494 
     95 
     96PJ_IDEF(void) pj_pool_safe_release( pj_pool_t **ppool ) 
     97{ 
     98    pj_pool_t *pool = *ppool; 
     99    *ppool = NULL; 
     100    pj_pool_release(pool); 
     101} 
Note: See TracChangeset for help on using the changeset viewer.