Add Td explicit destructor.

GitOrigin-RevId: aa7d2ee90a43bc0cf1bb003c7fb48735fcaf6a82
This commit is contained in:
levlam 2019-04-27 01:21:08 +03:00
parent a1ce0ae5a5
commit 1b7022e8ff
3 changed files with 5 additions and 2 deletions

View File

@ -260,7 +260,7 @@ function split_file($file, $chunks, $undo) {
if (strpos($cpp_name, 'Td.cpp') === false) { // destructor Td::~Td needs to see definitions of all forward-declared classes
$td_methods = array(
'auth_manager[_(-][^.]|AuthManager' => 'AuthManager',
'ConfigShared|shared_config[(][)]' => 'ConfigShared',
'ConfigShared|shared_config[(]' => 'ConfigShared',
'contacts_manager[_(-][^.]|ContactsManager([^ ;.]| [^*])' => 'ContactsManager',
'file_reference_manager[_(-][^.]|FileReferenceManager|file_references[)]' => 'FileReferenceManager',
'file_manager[_(-][^.]|FileManager([^ ;.]| [^*])|update_file[)]' => 'files/FileManager',
@ -307,7 +307,7 @@ $files = array('td/telegram/ContactsManager' => 20,
'td/telegram/MessagesManager' => 50,
'td/telegram/NotificationManager' => 10,
'td/telegram/StickersManager' => 10,
'td/telegram/Td' => 80,
'td/telegram/Td' => 50,
'td/generate/auto/td/telegram/td_api' => 10,
'td/generate/auto/td/telegram/td_api_json' => 10,
'td/generate/auto/td/telegram/telegram_api' => 10);

View File

@ -3011,6 +3011,8 @@ class GetInviteTextRequest : public RequestActor<string> {
Td::Td(unique_ptr<TdCallback> callback) : callback_(std::move(callback)) {
}
Td::~Td() = default;
void Td::on_alarm_timeout_callback(void *td_ptr, int64 alarm_id) {
auto td = static_cast<Td *>(td_ptr);
auto td_id = td->actor_id(td);

View File

@ -90,6 +90,7 @@ class Td final : public NetQueryCallback {
Td(Td &&) = delete;
Td &operator=(const Td &) = delete;
Td &operator=(Td &&) = delete;
~Td() override;
explicit Td(unique_ptr<TdCallback> callback);