mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-15 12:34:30 +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
8743ecf868
commit
bd0d95d2f9
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