Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/Thread.h

Issue 29361582: Issue 4613 - fix leak of Thread (Closed)
Patch Set: Created Nov. 3, 2016, 10:58 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/Thread.h
diff --git a/src/Thread.h b/src/Thread.h
index c4e6ab8e6314f0282460f0cc162a23dabd0e21ec..2c88745c0d623426b7ea6555601c328d8c2e27cf 100644
--- a/src/Thread.h
+++ b/src/Thread.h
@@ -56,17 +56,20 @@ namespace AdblockPlus
class Thread
{
public:
+ explicit Thread(bool deleteSelfOnFinish = false);
virtual ~Thread();
virtual void Run() = 0;
void Start();
void Join();
-
+ private:
+ static void CallRun(Thread* thread);
private:
#ifdef WIN32
HANDLE nativeThread;
#else
pthread_t nativeThread;
#endif
+ bool m_deleteSelfOnFinish;
};
}

Powered by Google App Engine
This is Rietveld