V3.5.0 (and 3.4.0) Lots of Particles in RecyclePools

I’m doing some memory profiling of our game and noticed that we seem to have a lot of particles allocated and put in the recycle pools but they don’t seem to go away. The game is Putt Party and we switch between scenes after each course. It doesn’t seem that switching scenes frees any particles in the pools either and they seem to accumulate over time growing our memory. It’s not a ton, but it does add up. This is what I’m seeing.

After playing a level and grabbing another snapshot

Could this possibly be related to this PR? fix particle system memory issue by holycanvas · Pull Request #11032 · cocos/cocos-engine · GitHub

Also, left a soak test going to see how much memory was allocated just sitting and the end of a course. Well, I have 6 animated characters in the scene and apparently there’s code in graph-debug.ts that is hanging onto them.

The results are over 5mb of animation weight stat references



It’s just constantly pushing these weights and never clearing them.

The one block guy is 3 characters and there are 3 sheep:

memory logs for the last 2 caps are here: Dropbox - cc_memory.zip - Simplify your life

I added a fix here: don't push data if debug is not enabled. by mikecoker · Pull Request #11118 · cocos/cocos-engine · GitHub

Yes , you can merge it.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.