phaserjs / template-webpack

A Phaser 3 project template that uses Webpack 5 for bundling

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why are so many phaser objects generated in memory without calling any function of phaser?

tsuribak opened this issue · comments

I have encountered a strange problem。please help me.

  1. I downloaded this project, and I commented out all lines 4-39 in index.js.
  2. After compiling, run npm start and open chrome. At the same time, open the memory tab page of devtools.
  3. It can be seen that the heap snapshot takes up about 50 M memory.
  4. After clicking take snapshot, you will find that there are many phaser objects (gameobject 20 curve 5 ....)in the memory.

How do i release these phaser objects from memory?
Can it leak memory?

20230406_110854.mp4