- Unity 2017 Game Optimization(Second Edition)
- Chris Dickinson
- 128字
- 2021-07-02 23:21:11
Keep previously loaded serialized objects in memory
As previously mentioned, once a serialized object has been loaded into memory, then it remains there and can be copied if we need it again later, such as instantiating more copies of a Prefab. We can free this data later with explicit calls to Resources.Unload(), which will release the memory space to be reused later. But, if we have a lot of surplus memory in the application's budget, then we could choose to keep this data in memory, which would reduce the need to reload it again from disk later. This naturally consumes a lot of memory with more and more serialized data, making it a risky strategy for memory management, and so we should only do this when necessary.
推薦閱讀
- Instant Testing with CasperJS
- Python概率統計
- The DevOps 2.3 Toolkit
- Java范例大全
- 深入理解Bootstrap
- Redis Applied Design Patterns
- jQuery EasyUI網站開發(fā)實戰(zhàn)
- Vue.js快跑:構建觸手可及的高性能Web應用
- Servlet/JSP深入詳解
- Java Web基礎與實例教程
- Python數據分析(第2版)
- Working with Odoo
- FPGA Verilog開發(fā)實戰(zhàn)指南:基于Intel Cyclone IV(進階篇)
- 執(zhí)劍而舞:用代碼創(chuàng)作藝術
- 并行編程方法與優(yōu)化實踐