Better way to delete CEglThreadSession. EGL_MERGE
authorJose Thachil<jose.thachil@cell-telecom.com>
Wed, 19 May 2010 14:34:22 +0100
branchEGL_MERGE
changeset 75 b3f964e007c8
parent 74 0f98da52363f
child 86 841b49c57c50
child 95 e97e5fe517d3
Better way to delete CEglThreadSession.
egl/eglrefimpl/src/session.cpp
egl/sfopenvg/riMiniEGL.cpp
--- a/egl/eglrefimpl/src/session.cpp	Wed May 19 11:44:23 2010 +0100
+++ b/egl/eglrefimpl/src/session.cpp	Wed May 19 14:34:22 2010 +0100
@@ -80,6 +80,7 @@
 
 CEglThreadSession::~CEglThreadSession()
 	{
+	delete iEgl;
 	CEglDriver::Close();
 	}
 
--- a/egl/sfopenvg/riMiniEGL.cpp	Wed May 19 11:44:23 2010 +0100
+++ b/egl/sfopenvg/riMiniEGL.cpp	Wed May 19 14:34:22 2010 +0100
@@ -443,12 +443,11 @@
 		}
 	}
 	*/
+	RDebug::Printf("I am in releaseEGL ");
 	CEglThreadSession* es = reinterpret_cast<CEglThreadSession*>(Dll::Tls());
 	if (es)
 		{
-		EGL* pEgl = es->getEgl();
-		if (pEgl)
-			delete pEgl;
+		delete es;
 		}
 	Dll::SetTls(NULL);
 }