playMaker

Author Topic: Memory Usage keeps on increasing with time, using Pool Manager  (Read 2651 times)

sidd4friends

  • Playmaker Newbie
  • *
  • Posts: 17
Memory Usage keeps on increasing with time, using Pool Manager
« on: October 12, 2015, 12:18:06 PM »
Hello,

I am stuck with an issue that I have trying to solve for a long time without much success. When building the game on IOS and running on Xcode, I can constantly see the memory usage increasing. When i load the Main Menu, the memory is around 92 mb which increases to around 218 mb on loading the gameplay scene. Now as i play the game, the memory keeps on increasing till it gets around 300 mb. Now if i get game over and reload the gameplay scene or I exit the scene and load the Main Menu, the memory usage jumps to around 350 mb. It does not decreases. Ideally, if i am exiting a scene, Unity should unload all its assets and load a new scene. I have tried the Clean Load action without much help. As i keep on switching between the scenes, the memory usage keep on increasing till the time the game crashes.

I am using Pool Manager to pool prefabs and spawn and despawn them. Even then the memory usage keeps on increasing. I am attaching the screenshots of the pool setting, spawning and despawning of prefabs. I also destroy the pools before loading a different scene.

I have tried Unloading Unused Assets action as well as Clean Level Load action to reduce the memory usage without any effect.

Please let me know if I am missing something important. I am using prefabs heavily in the game.

Thanks a lot,
Siddharth

sidd4friends

  • Playmaker Newbie
  • *
  • Posts: 17
Re: Memory Usage keeps on increasing with time, using Pool Manager
« Reply #1 on: October 13, 2015, 09:06:53 AM »
Any suggestions?

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Memory Usage keeps on increasing with time, using Pool Manager
« Reply #2 on: October 13, 2015, 09:56:08 AM »
Where did you find the Clean Level Load action? I'm not familiar with it...

You could try loading an empty level in-between levels. But maybe that is what Clean Level Load is doing...?

sidd4friends

  • Playmaker Newbie
  • *
  • Posts: 17
Re: Memory Usage keeps on increasing with time, using Pool Manager
« Reply #3 on: October 14, 2015, 08:38:49 AM »
The Clean Level Load Action is found on the Ecosystem. Yes, it loads an empty level before loading the required level. I have tried it as well but still the memory usage keeps on increasing :(

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Memory Usage keeps on increasing with time, using Pool Manager
« Reply #4 on: October 16, 2015, 08:27:10 AM »
Hi,

 It's likely not due to PlayMaker neither Pool Manager, but potentially a GameObject you think you destroyed and forgot about, but is still in the hierarchy, like a bullet or a prop in your scene that keeps being created, dismissed from all your code, but never actually destroyed.

when profiling, watch the number of objects, if it keeps growing linearly with the memory usage, it's this 100%.

 Bye,

 Jean