mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-14 03:54:25 +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. */
|
||||
if (hidden) {
|
||||
type = LottieLayer::Null;
|
||||
for (auto p = children.begin(); p < children.end(); ++p) delete(*p);
|
||||
children.reset();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue