From cb71adbfd5916a6964e229cfbf835283cee54a01 Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 14 Sep 2020 18:02:19 +0300 Subject: [PATCH] Fix CountryInfoManager destructor. GitOrigin-RevId: ed5225ff0f7937dd6d4d7584e4e3a7854acef8c2 --- td/telegram/CountryInfoManager.cpp | 2 ++ td/telegram/CountryInfoManager.h | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/td/telegram/CountryInfoManager.cpp b/td/telegram/CountryInfoManager.cpp index f303160d0..4c730483b 100644 --- a/td/telegram/CountryInfoManager.cpp +++ b/td/telegram/CountryInfoManager.cpp @@ -110,6 +110,8 @@ struct CountryInfoManager::CountryList { CountryInfoManager::CountryInfoManager(Td *td, ActorShared<> parent) : td_(td), parent_(std::move(parent)) { } +CountryInfoManager::~CountryInfoManager() = default; + void CountryInfoManager::tear_down() { parent_.reset(); } diff --git a/td/telegram/CountryInfoManager.h b/td/telegram/CountryInfoManager.h index 5602a40e0..5c985b028 100644 --- a/td/telegram/CountryInfoManager.h +++ b/td/telegram/CountryInfoManager.h @@ -32,6 +32,12 @@ class CountryInfoManager : public Actor { void get_phone_number_info(string phone_number_prefix, Promise> &&promise); + CountryInfoManager(const CountryInfoManager &) = delete; + CountryInfoManager &operator=(const CountryInfoManager &) = delete; + CountryInfoManager(CountryInfoManager &&) = delete; + CountryInfoManager &operator=(CountryInfoManager &&) = delete; + ~CountryInfoManager() override; + private: void tear_down() override;