Giter Site home page Giter Site logo

Comments (2)

JMLX42 avatar JMLX42 commented on July 19, 2024

Hello and thank you for your feedback!

Just remove:

stage.removeEventListener(KeyboardEvent.KEY_UP, onKeyRelease);

And press "space" continuously. You will notice that memory does not rise above a certain limit.
Which indicates that the "leak" you see is just the cost of some static init.

I think that JIT implies that some classes will be compiled only when necessary, thus rising the memory used. Also all the static const properties will take memory that will not be GC. Whether 10Mb of static init. is high or not is debatable indeed. To verify this, just comment:

scene.addChild(box);

You will notice that the memory rises only to your 18MB.

So even if this can be classified as a "memory leak" in its most literal definition, it is actually just a side effect of static init. At least your test does not highlight any actual leak per say.

Also, System.gc() does not work in the Flash Player as far as I can remember.

Please provide a code sample where doing the same thing multiple times continuously raises memory usage despite proper disposal. Otherwise, please close the issue.

Regards,

from minko.

stevewoolcock avatar stevewoolcock commented on July 19, 2024

OK, that makes sense. If the JIT is only compiling classes when necessary, rather than at initial launch, that would explain the rise in memory. As far as I know, System.gc() only works in debug builds/players.

from minko.

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.