官术网_书友最值得收藏!

Introduction

Memory management is always one of the most important things to get right in your computer program to ensure stability and good, bug-free operation of your code. A dangling pointer (pointer referring to something that has been removed from memory) is an example of a bug that is hard to track if it occurs.

In any computer program, memory management is extremely important. UE4's UObject reference counting system is the default way that memory is managed for Actors and UObject derivatives. This is the default way that your memory will be managed within your UE4 program.

If you write custom C++ classes of your own, which do not derive from UObject, you may find the TSharedPtr / TWeakPtr reference counted classes useful. These classes provide reference counting and automatic deletion for 0 reference objects.

This chapter provides recipes for memory management within UE4.

主站蜘蛛池模板: 沙雅县| 鄂托克旗| 河南省| 福州市| 永川市| 南充市| 凤山市| 长治县| 徐汇区| 建始县| 新津县| 来宾市| 新蔡县| 全南县| 安塞县| 邮箱| 黄陵县| 蓬莱市| 昌江| 连南| 兴文县| 金湖县| 秦安县| 榆中县| 开阳县| 武鸣县| 绥中县| 卓尼县| 乐平市| 汝南县| 定边县| 修水县| 昌黎县| 土默特右旗| 车险| 明光市| 左权县| 周宁县| 中牟县| 郑州市| 南阳市|