From 64e7bb326207df559b5cebdb278f62df83cf1425 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Mon, 10 Aug 2009 16:45:12 +0800 Subject: egl: Use _eglAddAtExitCall to free thread infos and displays. Thread infos and displays are usually not freed by applications. This commit add atexit calls to free them. Signed-off-by: Chia-I Wu --- src/egl/main/eglcurrent.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/egl/main/eglcurrent.c') diff --git a/src/egl/main/eglcurrent.c b/src/egl/main/eglcurrent.c index f92719cfbc..4431f964f6 100644 --- a/src/egl/main/eglcurrent.c +++ b/src/egl/main/eglcurrent.c @@ -4,6 +4,7 @@ #include "eglcontext.h" #include "egllog.h" #include "eglmutex.h" +#include "eglglobals.h" /* This should be kept in sync with _eglInitThreadInfo() */ @@ -84,7 +85,7 @@ static INLINE EGLBoolean _eglInitTSD(void (*dtor)(_EGLThreadInfo *)) return EGL_FALSE; } _egl_FreeTSD = dtor; - (void) _eglFiniTSD; + _eglAddAtExitCall(_eglFiniTSD); _egl_TSDInitialized = EGL_TRUE; } @@ -118,7 +119,7 @@ static INLINE EGLBoolean _eglInitTSD(void (*dtor)(_EGLThreadInfo *)) { if (!_egl_FreeTSD && dtor) { _egl_FreeTSD = dtor; - (void) _eglFiniTSD; + _eglAddAtExitCall(_eglFiniTSD); } return EGL_TRUE; } -- cgit v1.2.3