Topic: 64KB of GC allocs every frame causes stuttering and freezes
The profiler shows gc allocs of 64.3KB every frame which sums up to around 400MB per round. This can cause stuttering and freezes as reported on other topics. They are not predictable and so some can see the results after 15 mins others immediatly after just some seconds, depending on console, phone, etc.
Are they known and just for logging/debugging stuff? Then I'll have nothing to do Or are this the general reasons listed below, then this will take pretty long to hunt/find them
In general gc allocs are caused by:
- using LINQ for list-operations
- string values (every time when a string gets changed, for example showing time, internally a complete new string gets created and the old one causes the garbage collector to do his job)
- creating and destroying objects every time when needed (particles, but also other things)
- creating new lists because methodX delivers arrays and methodY needs lists
- some physics stuff like raycasting without using the gc allocs free version which unity provides now