Destroy big StoryManager fields asynchronously.

This commit is contained in:
levlam 2023-05-30 14:44:30 +03:00
parent 3a6494dd65
commit 0e2fcdde77

View File

@ -352,7 +352,9 @@ StoryManager::StoryManager(Td *td, ActorShared<> parent) : td_(td), parent_(std:
upload_media_callback_ = std::make_shared<UploadMediaCallback>();
}
StoryManager::~StoryManager() = default;
StoryManager::~StoryManager() {
Scheduler::instance()->destroy_on_scheduler(G()->get_gc_scheduler_id(), story_full_id_to_file_source_id_, stories_);
}
void StoryManager::tear_down() {
parent_.reset();