美文网首页
unity开发内存优化

unity开发内存优化

作者: 杨树叶的杨 | 来源:发表于2018-07-19 10:53 被阅读0次
    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.

    相关文章

      网友评论

          本文标题:unity开发内存优化

          本文链接:https://www.haomeiwen.com/subject/hggzpftx.html