aboutsummaryrefslogtreecommitdiffhomepage
path: root/td
diff options
context:
space:
mode:
Diffstat (limited to 'td')
-rw-r--r--td/telegram/CommunityManager.cpp4
-rw-r--r--td/telegram/CommunityManager.h5
2 files changed, 9 insertions, 0 deletions
diff --git a/td/telegram/CommunityManager.cpp b/td/telegram/CommunityManager.cpp
index 682757ca2..fc7e9ed32 100644
--- a/td/telegram/CommunityManager.cpp
+++ b/td/telegram/CommunityManager.cpp
@@ -72,6 +72,10 @@ void CommunityManager::Community::parse(ParserT &parser) {
CommunityManager::CommunityManager(Td *td, ActorShared<> parent) : td_(td), parent_(std::move(parent)) {
}
+CommunityManager::~CommunityManager() {
+ Scheduler::instance()->destroy_on_scheduler(G()->get_gc_scheduler_id(), communities_, unknown_communities_);
+}
+
void CommunityManager::tear_down() {
parent_.reset();
}
diff --git a/td/telegram/CommunityManager.h b/td/telegram/CommunityManager.h
index ce208caa0..56cd734bb 100644
--- a/td/telegram/CommunityManager.h
+++ b/td/telegram/CommunityManager.h
@@ -26,6 +26,11 @@ class Td;
class CommunityManager final : public Actor {
public:
CommunityManager(Td *td, ActorShared<> parent);
+ CommunityManager(const CommunityManager &) = delete;
+ CommunityManager &operator=(const CommunityManager &) = delete;
+ CommunityManager(CommunityManager &&) = delete;
+ CommunityManager &operator=(CommunityManager &&) = delete;
+ ~CommunityManager() final;
bool have_community(CommunityId community_id) const;