lottie: fixed a memory leak

Free the children data properly,
rarely observerd this, only when a layer is hidden.
This commit is contained in:
Hermet Park 2024-05-09 20:03:34 +09:00
parent 8743ecf868
commit bd0d95d2f9

View file

@ -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;
}