mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-28 00:57:09 +00:00
lottie: fixed a memory leak
Free the children data properly, rarely observerd this, only when a layer is hidden.
This commit is contained in:
parent
362faa3c9a
commit
eeb06870a0
1 changed files with 1 additions and 0 deletions
|
@ -207,6 +207,7 @@ void LottieLayer::prepare()
|
||||||
so force it to be a Null Layer and release all resource. */
|
so force it to be a Null Layer and release all resource. */
|
||||||
if (hidden) {
|
if (hidden) {
|
||||||
type = LottieLayer::Null;
|
type = LottieLayer::Null;
|
||||||
|
for (auto p = children.begin(); p < children.end(); ++p) delete(*p);
|
||||||
children.reset();
|
children.reset();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue