mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
The object relations:

Session manages SIP and Media object using shared resource or shared
ptr. Note that I actually use SrsExecutorCoroutine to delete the object
when each coroutine is done, because there is always a dedicate
coroutine for each object.
For SIP and Media object, they directly use the session by raw pointer,
it's safe because session always live longer than session and media
object.
---
Co-authored-by: Jacob Su <suzp1984@gmail.com>
31 lines
380 B
C++
31 lines
380 B
C++
//
|
|
// Copyright (c) 2013-2024 The SRS Authors
|
|
//
|
|
// SPDX-License-Identifier: MIT
|
|
//
|
|
|
|
#ifndef SRS_UTEST_CORE_HPP
|
|
#define SRS_UTEST_CORE_HPP
|
|
|
|
/*
|
|
#include <srs_utest_core.hpp>
|
|
*/
|
|
#include <srs_utest.hpp>
|
|
|
|
#include <string>
|
|
|
|
class MyNormalObject
|
|
{
|
|
private:
|
|
int id_;
|
|
public:
|
|
MyNormalObject(int id) {
|
|
id_ = id;
|
|
}
|
|
int id() {
|
|
return id_;
|
|
}
|
|
};
|
|
|
|
#endif
|
|
|