mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
SmartPtr: Support shared ptr for SRT source. (#4084)
--- Co-authored-by: Haibo Chen <495810242@qq.com>
This commit is contained in:
parent
6834ec208d
commit
7b9c52b283
9 changed files with 42 additions and 36 deletions
|
@ -98,7 +98,7 @@ private:
|
|||
uint32_t* ref_count_;
|
||||
public:
|
||||
// Create a shared ptr with the object.
|
||||
SrsSharedPtr(T* ptr) {
|
||||
SrsSharedPtr(T* ptr = NULL) {
|
||||
ptr_ = ptr;
|
||||
ref_count_ = new uint32_t(1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue