unity开发内存优化

  1. ManagedHeap 表示的是Mono所使用的托管堆内存,C#上任何的申请托管的内存都会在这里申请。
  2. ManagedHeap.UsedSize 表示这个托管堆上已经使用的内存大小
  3. ManagedHeap.reservedUnUsedSize 表示托管堆上未使用的内存大小

关于Mono 内存的官方描述:(只增不减)
Memory is allocated in heap blocks. More can allocated if it cannot fit the data into the allocated block. Heap blocks will be kept in Mono until the app is closed. In other words, Mono does not release any memory used to the OS (Unity 3.x). Once you allocate a certain amount of memory, it is reserved for mono and not available for the OS. Even when you release it, it will become available internally for Mono only and not for the OS. The heap memory value in the Profiler will only increase, never decrease.

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,458评论 0 10
  • 村头有一群花花绿绿的女人。正在热情洋溢地撅着屁股在一块空地上忙着。 门畔上闲逛的刘德贵,看到这一热闹景象,...
    静秋飞燕阅读 594评论 0 0
  • 我是一位旅者,来着感情的沙漠。寻寻觅觅,只为年少希冀已久的火红风景。我的行囊很小,却压弯了我的背脊,那些曾经相...
    十二张阅读 122评论 0 0
  • 手腕痛,手掌痛,手指无力、酸痛……出现这些症状你要当心了!因为不知不觉中,你可能比已经患上一种叫「腱鞘炎」的关节炎...
    细心收藏着阅读 1,162评论 0 0