aboutsummaryrefslogtreecommitdiffstats
path: root/emulator
diff options
context:
space:
mode:
authorkeunyoung <keunyoung@google.com>2013-04-01 12:46:24 -0700
committerkeunyoung <keunyoung@google.com>2013-04-01 12:46:24 -0700
commit06ebcd593ed97f99ed1e6d2672a71dd29e249cda (patch)
tree72418661c97ab145686a4d74339f7f4081c4785b /emulator
parent17bad116b0fc705d5e6cfcd3ead6c38945e7ce86 (diff)
downloadsdk-06ebcd593ed97f99ed1e6d2672a71dd29e249cda.zip
sdk-06ebcd593ed97f99ed1e6d2672a71dd29e249cda.tar.gz
sdk-06ebcd593ed97f99ed1e6d2672a71dd29e249cda.tar.bz2
delete socket when the thread is destroyed
- SocketStream is passed from RenderServer::Main, but it is not deleted. - As a result, emulator will keep opening these sockets. Change-Id: I4f2445855fc45a8d5f20f4d598e7021e8f3e000c
Diffstat (limited to 'emulator')
-rw-r--r--emulator/opengl/host/libs/libOpenglRender/RenderThread.cpp5
-rw-r--r--emulator/opengl/host/libs/libOpenglRender/RenderThread.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/emulator/opengl/host/libs/libOpenglRender/RenderThread.cpp b/emulator/opengl/host/libs/libOpenglRender/RenderThread.cpp
index 0119133..5ffea4b 100644
--- a/emulator/opengl/host/libs/libOpenglRender/RenderThread.cpp
+++ b/emulator/opengl/host/libs/libOpenglRender/RenderThread.cpp
@@ -31,6 +31,11 @@ RenderThread::RenderThread() :
{
}
+RenderThread::~RenderThread()
+{
+ delete m_stream;
+}
+
RenderThread *RenderThread::create(IOStream *p_stream)
{
RenderThread *rt = new RenderThread();
diff --git a/emulator/opengl/host/libs/libOpenglRender/RenderThread.h b/emulator/opengl/host/libs/libOpenglRender/RenderThread.h
index 67d423f..80a9aef 100644
--- a/emulator/opengl/host/libs/libOpenglRender/RenderThread.h
+++ b/emulator/opengl/host/libs/libOpenglRender/RenderThread.h
@@ -25,7 +25,7 @@ class RenderThread : public osUtils::Thread
{
public:
static RenderThread *create(IOStream *p_stream);
-
+ virtual ~RenderThread();
bool isFinished() const { return m_finished; }
private: