mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
SmartPtr: Support detect memory leak by valgrind. v6.0.132 (#4102)
1. Support detect memory leak by valgrind. 2. Free the http handler entry. 3. Free the stack of ST. --- Co-authored-by: Jacob Su <suzp1984@gmail.com>
This commit is contained in:
parent
ea7e2c2849
commit
7ab012c60f
18 changed files with 286 additions and 69 deletions
|
@ -370,8 +370,6 @@ SrsServer::~SrsServer()
|
|||
|
||||
void SrsServer::destroy()
|
||||
{
|
||||
srs_warn("start destroy server");
|
||||
|
||||
srs_freep(trd_);
|
||||
srs_freep(timer_);
|
||||
|
||||
|
@ -869,11 +867,8 @@ void SrsServer::stop()
|
|||
srs_trace("srs gracefully quit");
|
||||
}
|
||||
|
||||
// This is the last line log of SRS.
|
||||
srs_trace("srs terminated");
|
||||
|
||||
// for valgrind to detect.
|
||||
srs_freep(_srs_config);
|
||||
srs_freep(_srs_log);
|
||||
}
|
||||
|
||||
srs_error_t SrsServer::cycle()
|
||||
|
@ -1406,6 +1401,7 @@ srs_error_t SrsServerAdapter::run(SrsWaitGroup* wg)
|
|||
|
||||
void SrsServerAdapter::stop()
|
||||
{
|
||||
srs->stop();
|
||||
}
|
||||
|
||||
SrsServer* SrsServerAdapter::instance()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue