From 271cf23083b38b3f0d12a36bb1f28e458ee43861 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Tue, 21 Nov 2006 12:39:31 +0000 Subject: 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: http://svn.pjsip.org/repos/pjproject/trunk@815 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib/include/pj/types.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'pjlib/include/pj/types.h') diff --git a/pjlib/include/pj/types.h b/pjlib/include/pj/types.h index d15bd60f..df3b92e4 100644 --- a/pjlib/include/pj/types.h +++ b/pjlib/include/pj/types.h @@ -291,9 +291,29 @@ typedef int pj_exception_id_t; * function is to initialize static library data, such as character table used * in random string generation, and to initialize operating system dependent * functionality (such as WSAStartup() in Windows). + * + * @return PJ_SUCCESS on success. */ PJ_DECL(pj_status_t) pj_init(void); + +/** + * Shutdown PJLIB. + */ +PJ_DECL(void) pj_shutdown(void); + +/** + * Register cleanup function to be called by PJLIB when pj_shutdown() is + * called. + * + * @param func The function to be registered. + * + * @return PJ_SUCCESS on success. + */ +PJ_DECL(pj_status_t) pj_atexit(void (*func)(void)); + + + /** * Swap the byte order of an 16bit data. * -- cgit v1.2.3