mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 04:35:34 +08:00
[fix] use shared ptr to create real time clock
This commit is contained in:
@@ -60,4 +60,8 @@ Clock* Clock::GetRealTimeClock() {
|
||||
static Clock* const clock = new RealTimeClock();
|
||||
return clock;
|
||||
}
|
||||
|
||||
std::shared_ptr<Clock> Clock::GetRealTimeClockShared() {
|
||||
return std::make_shared<RealTimeClock>();
|
||||
}
|
||||
} // namespace webrtc
|
||||
@@ -66,6 +66,7 @@ class Clock {
|
||||
|
||||
// Returns an instance of the real-time system clock implementation.
|
||||
static Clock* GetRealTimeClock();
|
||||
static std::shared_ptr<Clock> GetRealTimeClockShared();
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
Reference in New Issue
Block a user