aboutsummaryrefslogtreecommitdiffhomepage
path: root/td/telegram/CommunityManager.cpp
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2026-07-10 15:34:58 +0300
committerlevlam <levlam@telegram.org>2026-07-10 15:34:58 +0300
commita9893647d03486061da77c5a005141bdb2aee573 (patch)
tree0ab90980f99f2d81e36529de100099dbf2cd30af /td/telegram/CommunityManager.cpp
parent1722aefd7ba37b96bbb47dfb7436504cbfb818fb (diff)
Destroy big maps in CommunityManager asynchronously.
Diffstat (limited to 'td/telegram/CommunityManager.cpp')
-rw-r--r--td/telegram/CommunityManager.cpp4
1 files changed, 4 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();
}