mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
SmartPtr: Support shared ptr for live source. v6.0.129 (#4089)
Detail change log: 1. [Simple,Refactor] Remove member fields of http entry, etc. https://github.com/ossrs/srs/pull/4089/commits/e34b3d3aa44f56b49c5c0b8e58c0285c4d9094d4 2. [Ignore] Rename source to live_source. https://github.com/ossrs/srs/pull/4089/commits/846f95ec96f183909070c4b3f5ef0e9dd7d5448d 3. [Ignore] Use directly ptr in consumer. https://github.com/ossrs/srs/pull/4089/commits/d38af021ad532ed9b4043c529dd5e54b9cbf5c01 4. [Complex, Important] Use shared ptr for live source. https://github.com/ossrs/srs/pull/4089/commits/88f922413a1fb5cb920ab64f8b3805420932602a The object relationship:  --- Co-authored-by: Jacob Su <suzp1984@gmail.com>
This commit is contained in:
parent
908c2f2a30
commit
e7069788e9
30 changed files with 256 additions and 235 deletions
|
|
@ -11,6 +11,9 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
|
||||
// The auto free helper, which is actually the unique ptr, without the move feature,
|
||||
// see https://github.com/ossrs/srs/discussions/3667#discussioncomment-8969107
|
||||
//
|
||||
// To free the instance in the current scope, for instance, MyClass* ptr,
|
||||
// which is a ptr and this class will:
|
||||
// 1. free the ptr.
|
||||
|
|
@ -81,7 +84,9 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
// Shared ptr smart pointer, see https://github.com/ossrs/srs/discussions/3667#discussioncomment-8969107
|
||||
// Shared ptr smart pointer, only support shared ptr, no weak ptr, no shared from this, no inheritance,
|
||||
// no comparing, see https://github.com/ossrs/srs/discussions/3667#discussioncomment-8969107
|
||||
//
|
||||
// Usage:
|
||||
// SrsSharedPtr<MyClass> ptr(new MyClass());
|
||||
// ptr->do_something();
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@
|
|||
|
||||
#define VERSION_MAJOR 6
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 128
|
||||
#define VERSION_REVISION 129
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue