tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

Is there a method to copy td_api objects? #2283

Closed Yxue-1906 closed 1 year ago

Yxue-1906 commented 1 year ago

I need to send update to several handlers, it would be convenient if there is a method can deep copy objects.

levlam commented 1 year ago

There is no method for deep copy of the objects, but you can use object.release() and create a std::shared pointer from the returned pointer.

Yxue-1906 commented 1 year ago

got it, thx for your advice!