Continously memory occupation grow
Posted: 08 Mar 2011, 17:44
Hi everyone,
after a week full of trouble looking for memory leaks in my application I decided to post here cause the last test I did...
what's the problem? ...well memory continously grows till everything die, slowly but it grows...
I'll explain better... I've worte a Unity3D game based on several levels in witch I use smartfox server 2X to handle multiples users.
What is happening? well the game was crashing after a few level changes.
So I started serching for unreleased objects ...and I found out tha Unity has a "little" problem with memory release in scene load ( this happened to several people, just google for it... ) Patched! ...but the problem still remain, so I checked out all my code ( I use assets bundles for the resources ) and fixed all the possible point causing the problem and also release all unused bundles just to be sure...
...nothing... the problem is still there ...memory still grows up.
So I started removing parts, and levels till I remain with the startup scene.
In this startup scene, I've got an object marked to be persistent in level changes which contain my global managers (static classes or singletons) and nothing else.
What I found? ...that in the network manager class (the one which uses smartfox, connect correctly ...no problem at all with that ) ...In the fixedUpdate i call " smartFox.ProcessEvents(); " nothing strange ...well yes but if I remove that line of code ...my problem with memory grow go away! So that line cause the problem! ...but now I've got another problem... I cannot delete it ..or nothing related to smartfox work!
Another thing, I'm using a particular DLL ( apparently different from the one bundled with SMS 2X framework for unity ) from Thomas Lund which support accented characters in messages.
Could be something related to that particular DLL the problem, sincerely I don't remember if the problem existed also with the standard one.
So if anyone can help me...thanks a lot!
Thomas I thank you in advance
Davide
after a week full of trouble looking for memory leaks in my application I decided to post here cause the last test I did...
what's the problem? ...well memory continously grows till everything die, slowly but it grows...
I'll explain better... I've worte a Unity3D game based on several levels in witch I use smartfox server 2X to handle multiples users.
What is happening? well the game was crashing after a few level changes.
So I started serching for unreleased objects ...and I found out tha Unity has a "little" problem with memory release in scene load ( this happened to several people, just google for it... ) Patched! ...but the problem still remain, so I checked out all my code ( I use assets bundles for the resources ) and fixed all the possible point causing the problem and also release all unused bundles just to be sure...
...nothing... the problem is still there ...memory still grows up.
So I started removing parts, and levels till I remain with the startup scene.
In this startup scene, I've got an object marked to be persistent in level changes which contain my global managers (static classes or singletons) and nothing else.
What I found? ...that in the network manager class (the one which uses smartfox, connect correctly ...no problem at all with that ) ...In the fixedUpdate i call " smartFox.ProcessEvents(); " nothing strange ...well yes but if I remove that line of code ...my problem with memory grow go away! So that line cause the problem! ...but now I've got another problem... I cannot delete it ..or nothing related to smartfox work!
Another thing, I'm using a particular DLL ( apparently different from the one bundled with SMS 2X framework for unity ) from Thomas Lund which support accented characters in messages.
Could be something related to that particular DLL the problem, sincerely I don't remember if the problem existed also with the standard one.
So if anyone can help me...thanks a lot!
Thomas I thank you in advance
Davide