mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix mem leak detect bug, destroy server when quit
This commit is contained in:
parent
7465f2d20b
commit
e492180b78
2 changed files with 8 additions and 0 deletions
|
@ -310,6 +310,11 @@ SrsServer::SrsServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
SrsServer::~SrsServer()
|
SrsServer::~SrsServer()
|
||||||
|
{
|
||||||
|
destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SrsServer::destroy()
|
||||||
{
|
{
|
||||||
_srs_config->unsubscribe(this);
|
_srs_config->unsubscribe(this);
|
||||||
|
|
||||||
|
@ -538,6 +543,8 @@ int SrsServer::cycle()
|
||||||
#ifdef SRS_AUTO_INGEST
|
#ifdef SRS_AUTO_INGEST
|
||||||
ingester->stop();
|
ingester->stop();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
destroy();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,6 +128,7 @@ private:
|
||||||
public:
|
public:
|
||||||
SrsServer();
|
SrsServer();
|
||||||
virtual ~SrsServer();
|
virtual ~SrsServer();
|
||||||
|
virtual void destroy();
|
||||||
public:
|
public:
|
||||||
virtual int initialize();
|
virtual int initialize();
|
||||||
virtual int initialize_signal();
|
virtual int initialize_signal();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue