- Home /
Allocated heap -- can't compact?
This is a general question.
Based on what I have read, (allocated) heap size for mono objects will continue to grow if one keeps allocating reference types. Even if those items are garbage collected, their previously used space will be marked as available in a growing heap. I assume that when Unity manages instantiated and destroyed game objects, textures, etc, it also applies a similar strategy.
My question is: does the mono heap ever get compacted or could that happen only during level loads? Also, does the same idea apply for space allocated for Unity objects (and managed by Unity)? Assuming no compacting occurs, I assume it's because it would be slow/complicated?
I know of Resources.UnloadUnusedAssets, but it would appear that it would unload unused Unity assets, not reduce allocated heap size. Thanks...
Your answer
Follow this Question
Related Questions
Is generational garbage collection enabled in Unity 5.5? 1 Answer
How to remove spike frame time completely? 0 Answers
Will installing a newer mono version break Unity's mono installation ? (OSX) 2 Answers
Where is the Mono C# compiler for Unity iPhone? 1 Answer
Are there any tips for speeding up SQLite through Unity on iOS 1 Answer