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



git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@815 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjsip-apps/src/samples/level.c b/pjsip-apps/src/samples/level.c
index 278ad7a..27b4dda 100644
--- a/pjsip-apps/src/samples/level.c
+++ b/pjsip-apps/src/samples/level.c
@@ -155,6 +155,9 @@
     /* Destroy pool factory */
     pj_caching_pool_destroy( &cp );
 
+    /* Shutdown PJLIB */
+    pj_shutdown();
+
 
     /* Done. */
     return 0;