mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix memory leak at source. 2.0.214
This commit is contained in:
parent
6ec60b0a21
commit
c7b97aa1c3
8 changed files with 103 additions and 4 deletions
|
@ -71,6 +71,15 @@ int SrsThreadContext::set_id(int v)
|
|||
return ov;
|
||||
}
|
||||
|
||||
void SrsThreadContext::clear_cid()
|
||||
{
|
||||
st_thread_t self = st_thread_self();
|
||||
std::map<st_thread_t, int>::iterator it = cache.find(self);
|
||||
if (it != cache.end()) {
|
||||
cache.erase(it);
|
||||
}
|
||||
}
|
||||
|
||||
// the max size of a line of log.
|
||||
#define LOG_MAX_SIZE 4096
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue