mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
add srs memory watcher.
This commit is contained in:
parent
811ef4bcf6
commit
8b3bd5b4b9
11 changed files with 178 additions and 3 deletions
|
@ -38,6 +38,7 @@ using namespace std;
|
|||
#include <srs_kernel_file.hpp>
|
||||
#include <srs_kernel_codec.hpp>
|
||||
#include <srs_kernel_utility.hpp>
|
||||
#include <srs_core_mem_watch.hpp>
|
||||
|
||||
SrsMessageHeader::SrsMessageHeader()
|
||||
{
|
||||
|
@ -159,6 +160,9 @@ SrsCommonMessage::SrsCommonMessage()
|
|||
|
||||
SrsCommonMessage::~SrsCommonMessage()
|
||||
{
|
||||
#ifdef SRS_MEM_WATCH
|
||||
srs_memory_unwatch(payload);
|
||||
#endif
|
||||
srs_freep(payload);
|
||||
}
|
||||
|
||||
|
@ -171,6 +175,9 @@ SrsSharedPtrMessage::SrsSharedPtrPayload::SrsSharedPtrPayload()
|
|||
|
||||
SrsSharedPtrMessage::SrsSharedPtrPayload::~SrsSharedPtrPayload()
|
||||
{
|
||||
#ifdef SRS_MEM_WATCH
|
||||
srs_memory_unwatch(payload);
|
||||
#endif
|
||||
srs_freep(payload);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue