mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix dvr mem leak, free msg when not use it.
This commit is contained in:
parent
36c2c37b42
commit
0c91fa6bed
5 changed files with 27 additions and 0 deletions
|
@ -84,6 +84,7 @@ class SrsThread
|
|||
{
|
||||
private:
|
||||
st_thread_t tid;
|
||||
int _cid;
|
||||
bool loop;
|
||||
private:
|
||||
ISrsThreadHandler* handler;
|
||||
|
@ -97,6 +98,12 @@ public:
|
|||
SrsThread(ISrsThreadHandler* thread_handler, int64_t interval_us);
|
||||
virtual ~SrsThread();
|
||||
public:
|
||||
/**
|
||||
* get the context id. @see: ISrsThreadContext.get_id().
|
||||
* used for parent thread to get the id.
|
||||
* @remark when start thread, parent thread will block and wait for this id ready.
|
||||
*/
|
||||
virtual int cid();
|
||||
/**
|
||||
* start the thread, invoke the cycle of handler util
|
||||
* user stop the thread.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue