Git Product home page Git Product logo

Comments (9)

bodymovin avatar bodymovin commented on May 7, 2024

@Tolmark12 Thanks, I'll take a look at it. So you're using the svg renderer and you have png images animating?

from lottie-web.

Tolmark12 avatar Tolmark12 commented on May 7, 2024

Yeah, some of the time. The vector assets were sometimes so complex, that replacing them with pngs was needed to speed things up.

from lottie-web.

Tolmark12 avatar Tolmark12 commented on May 7, 2024

@bodymovin I just downloaded the new lib and ran a test, and as far as I can tell, it looks like items remain in RAM even after destroying an animation. See the following video for clarity : https://www.youtube.com/watch?v=5oUGoqLMczY

from lottie-web.

Tolmark12 avatar Tolmark12 commented on May 7, 2024

Any data, or DOM elements that have a variable with it's value assigned to that item (a pointer) won't be removed from RAM during garbage collection. Event handlers can be especially troublesome. ie: if you set an event handler on some object and even remove all pointers, but don't remove the event listener, the object won't be garbage collected

(Just tell me to shut up if you already know all this :-)

from lottie-web.

bodymovin avatar bodymovin commented on May 7, 2024

@Tolmark12 yes, every reference to dom elements should be removed when calling destroy. I'll keep looking into it.

from lottie-web.

Tolmark12 avatar Tolmark12 commented on May 7, 2024

I think all the dom elements may be cleared, but maybe there is data elements still in memory?

from lottie-web.

1pocketaces1 avatar 1pocketaces1 commented on May 7, 2024

Hi I am still having this issue even though it apparently got fixed?

from lottie-web.

bodymovin avatar bodymovin commented on May 7, 2024

@1pocketaces1 hi, can you share a link with the issue and more details about it?

from lottie-web.

1pocketaces1 avatar 1pocketaces1 commented on May 7, 2024

So after more research and trials I found out that it is necessary to call the animation.destroy() inside the angular component onDestroy() for every animation used in the component. Doing this will work in cleaning up the heap, but if this is not done, then the memory is lost. Thanks for responding!

from lottie-web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.