kuket15

Members
  • Content count

    1
  • Joined

  • Last visited

About kuket15

  • Rank
    Newbie

Recent Profile Visitors

232 profile views
  1. In Firefox the following code seems to eat memory very fast. You can try directly from http://phaser.io/examples In Windows Task Manager I can see memory constantly grows. var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update }); function preload() { game.load.image('mushroom', 'assets/sprites/mushroom2.png'); } function create() { var sprite = game.add.sprite(200, 200, 'mushroom'); sprite.tint = Math.random() * 0xffffff; } function update() { game.state.restart(); } To be honest I'm not so skilled about garbage collection and how Firefox deals with memory, but I'd expect memory to be cleaned every time the state is restarted. So, is there anything wrong with this code? Thanks is advance, Luca