mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
SquashSRS4: Remove object cache and stat api
This commit is contained in:
parent
f711eb79ed
commit
6a980683f7
44 changed files with 141 additions and 1277 deletions
|
@ -229,19 +229,6 @@ SrsSharedPtrMessage::~SrsSharedPtrMessage()
|
|||
}
|
||||
}
|
||||
|
||||
bool SrsSharedPtrMessage::recycle()
|
||||
{
|
||||
// When recycle, unwrap if not the last reference.
|
||||
if (ptr && ptr->shared_count > 0) {
|
||||
ptr->shared_count--;
|
||||
ptr = NULL;
|
||||
payload = NULL;
|
||||
size = 0;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
srs_error_t SrsSharedPtrMessage::create(SrsCommonMessage* msg)
|
||||
{
|
||||
srs_error_t err = srs_success;
|
||||
|
@ -369,7 +356,7 @@ SrsSharedPtrMessage* SrsSharedPtrMessage::copy()
|
|||
|
||||
SrsSharedPtrMessage* SrsSharedPtrMessage::copy2()
|
||||
{
|
||||
SrsSharedPtrMessage* copy = _srs_rtp_msg_cache_objs->allocate();
|
||||
SrsSharedPtrMessage* copy = new SrsSharedPtrMessage();
|
||||
|
||||
// We got an object from cache, the ptr might exists, so unwrap it.
|
||||
//srs_assert(!copy->ptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue