mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Fix shared msg cache bug
This commit is contained in:
parent
eed98dd85b
commit
171ae5dd2d
4 changed files with 31 additions and 31 deletions
|
@ -313,7 +313,7 @@ public:
|
|||
virtual ~SrsSharedPtrMessage();
|
||||
public:
|
||||
// For object cache to reset and reuse it.
|
||||
bool recycle() { return true; }
|
||||
bool recycle();
|
||||
// Create shared ptr message,
|
||||
// copy header, manage the payload of msg,
|
||||
// set the payload to NULL to prevent double free.
|
||||
|
@ -328,8 +328,6 @@ public:
|
|||
// Create shared ptr message from RAW payload.
|
||||
// @remark Note that the header is set to zero.
|
||||
virtual void wrap(char* payload, int size);
|
||||
// Decrease the reference, if the last one, free it.
|
||||
void unwrap();
|
||||
// Get current reference count.
|
||||
// when this object created, count set to 0.
|
||||
// if copy() this object, count increase 1.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue