Hi Guys,
im trying to find out the memory usage for the current level. Is there a way to find out the current memory allocated by the application at a particular movement???
Im loading set of images using prefabs and doing the animation and once the animation is completed im destroying it using DestroyImmediate and i just wanna check if the memory and the resources are getting free properly. as after sometime im getting a crash.
The profiler will give you this data. In the Xcode property enable the profiler output, it will give you the allocated memory and garbage collections.
DestroyImmediate is something you want to be very careful with, I never use it myself.
I suggest you take a look at the profiler and make sure you’re just not allocating faster than the garbage collector can deallocate. If this happens your memory will grow to dangerous limits.
I always making sure that the game is not allocating anything when the game is standing still and I’m not touching the screen.
@DASARADHI: i know we can use Instrument for this but i display this values on the Screen. Some thing like DetectLeaks.cs where we can check how many objects are been a currently in use. it tall us about the all available audio, mesh, texture, and so on.
same way i just wanted to knw tht is there a way to get the current memory in use as well???
@rozgo : if DestroyImmediate might cause the problem than what can we use to delete the cloned prefabs object run time. i have switched to Destroy now so will it reduce the memory problem??