- Home /
How to remove spike frame time completely?
As I know, Unity3D for iOS is based on Mono runtime and Mono has only generational mark & sweep GC. This GC system can't avoid GC time which stops game system. Instance pooling can reduce this but not completely, because we can't control instantiation happens in .NET's base class library. And those hidden small and frequent instances will raise un-deterministic GC time eventually. And forcing complete GC periodically will degrade performance greatly. Can Mono force complete GC actually?
So, how can I avoid this GC time when using Unity3D without huge performance degrade? If I have wrong information, please correct me :)
"Can $$anonymous$$ono force complete GC actually?" -- You can call System.GC.Collect, although it is indeed very slow so you're usually better off not calling it (except maybe when you can hide the delay with a screen transition or something).