Ignore:
Timestamp:
Nov 21, 2006 12:39:31 PM (17 years ago)
Author:
bennylp
Message:

Fixed handles leak upon program exit, by introducing pj_shutdown() and pj_atexit(). Also fixed handle leaks in SIP transaction layer and SIP endpoint.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/except.c

    r635 r815  
    5252} 
    5353 
     54static void exception_cleanup(void) 
     55{ 
     56    if (thread_local_id != -1) { 
     57        pj_thread_local_free(thread_local_id); 
     58        thread_local_id = -1; 
     59    } 
     60} 
     61 
    5462PJ_DEF(void) pj_push_exception_handler_(struct pj_exception_state_t *rec) 
    5563{ 
     
    5967        pj_thread_local_alloc(&thread_local_id); 
    6068        pj_assert(thread_local_id != -1); 
     69        pj_atexit(&exception_cleanup); 
    6170    } 
    6271    parent_handler = pj_thread_local_get(thread_local_id); 
Note: See TracChangeset for help on using the changeset viewer.