Fix CountryInfoManager destructor.

GitOrigin-RevId: ed5225ff0f7937dd6d4d7584e4e3a7854acef8c2
This commit is contained in:
levlam 2020-09-14 18:02:19 +03:00
parent ac197bec10
commit cb71adbfd5
2 changed files with 8 additions and 0 deletions

View File

@ -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();
}

View File

@ -32,6 +32,12 @@ class CountryInfoManager : public Actor {
void get_phone_number_info(string phone_number_prefix,
Promise<td_api::object_ptr<td_api::phoneNumberInfo>> &&promise);
CountryInfoManager(const CountryInfoManager &) = delete;
CountryInfoManager &operator=(const CountryInfoManager &) = delete;
CountryInfoManager(CountryInfoManager &&) = delete;
CountryInfoManager &operator=(CountryInfoManager &&) = delete;
~CountryInfoManager() override;
private:
void tear_down() override;