Make Timer::Ptr a std::shared_ptr

This commit is contained in:
Alexander A. Klimov 2023-03-21 10:41:52 +01:00
parent 9ee4d08722
commit 24681b30f6
1 changed files with 3 additions and 2 deletions

View File

@ -6,6 +6,7 @@
#include "base/i2-base.hpp" #include "base/i2-base.hpp"
#include "base/object.hpp" #include "base/object.hpp"
#include <boost/signals2.hpp> #include <boost/signals2.hpp>
#include <memory>
namespace icinga { namespace icinga {
@ -19,12 +20,12 @@ class TimerHolder;
class Timer final : public Object class Timer final : public Object
{ {
public: public:
DECLARE_PTR_TYPEDEFS(Timer); typedef std::shared_ptr<Timer> Ptr;
static inline static inline
Ptr Create() Ptr Create()
{ {
return new Timer(); return Ptr(new Timer());
} }
~Timer() override; ~Timer() override;