1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

RTC: Cache the large buffer allocation

This commit is contained in:
winlin 2021-02-26 19:46:52 +08:00
parent 65ba88de3f
commit d5b210abc8
9 changed files with 135 additions and 133 deletions

View file

@ -312,6 +312,8 @@ public:
SrsSharedPtrMessage();
virtual ~SrsSharedPtrMessage();
public:
// For object cache to reset and reuse it.
bool reset() { return true; }
// Create shared ptr message,
// copy header, manage the payload of msg,
// set the payload to NULL to prevent double free.