mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-15 04:24:28 +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
bbf182848f
commit
b2adb2b8f3
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