winlin

fix mem leak detect bug, destroy server when quit

... ... @@ -311,6 +311,11 @@ SrsServer::SrsServer()
SrsServer::~SrsServer()
{
destroy();
}
void SrsServer::destroy()
{
_srs_config->unsubscribe(this);
if (true) {
... ... @@ -539,6 +544,8 @@ int SrsServer::cycle()
ingester->stop();
#endif
destroy();
return ret;
}
... ...
... ... @@ -128,6 +128,7 @@ private:
public:
SrsServer();
virtual ~SrsServer();
virtual void destroy();
public:
virtual int initialize();
virtual int initialize_signal();
... ...