mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-08 15:23:12 +00:00
lottie/memoryleak: Destory the player handle properly in capi destroy() implementation.
Change-Id: Ie3a2b8d619e6e7c038c4296789952ecb4653b12f
This commit is contained in:
parent
820b61b3c0
commit
d1c3b19e01
@ -36,8 +36,13 @@ LOT_EXPORT Lottie_Animation_S *lottie_animation_from_data(const char *data, cons
|
||||
|
||||
LOT_EXPORT void lottie_animation_destroy(Lottie_Animation_S *animation)
|
||||
{
|
||||
if (animation)
|
||||
if (animation) {
|
||||
if (animation->mRenderTask.valid()) {
|
||||
animation->mRenderTask.get();
|
||||
}
|
||||
animation->mAnimation = nullptr;
|
||||
delete animation;
|
||||
}
|
||||
}
|
||||
|
||||
LOT_EXPORT void lottie_animation_get_size(const Lottie_Animation_S *animation, size_t *width, size_t *height)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user