1
0
Fork 0
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:
Winlin 2024-06-13 14:44:09 +08:00 committed by GitHub
parent 6834ec208d
commit 7b9c52b283
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 42 additions and 36 deletions

View file

@ -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);
}