How do I avoid "out of memory" in browser when running a C3 app for a long time ?

0 favourites
  • 2 posts
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • Hi !

    I'm using C3 for an art project so it has to stay alive for a very long time (a day long)

    The game itself takes a lot of CPU but it goes alright when you play.

    When the game is idling, it goes back to a very minimalistic scene, so I thought it would not use CPU/memory. The only event is like "goto layout X when any key is pressed". No sound or anything.

    But actually Chrome still goes "out of memory" after some time, game after game, (30 minutes~1 hour, depending the computer) and I don't understand how it is possible since the game does absolutely nothing when it gets back to intro scene.

    I'm no memory expert but still I tried to watch debug tools :

    - C3 intro scene shows : 3,7% CPU, 0% GPU, 49.6mb images

    - In memory tab in dev tools for Chrome, I see JS memory heap is constantly increasing, even when the game goes back to intro scene

    Could it come from there ? It sound logical that the browser will go out of memory if the use is always increasing. How to avoid that ?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Sounds like a memory leak. Can you see Chrome memory usage increasing in Task Manager?

    Another possibility is that some object is constantly getting spawned. You can check this in debug view.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)