O'Reilly logo
  • LI WEI thinks this is interesting:

The constructor in your C++ code is a simple little function that runs once when the C++ object is first created. The destructor runs once when the C++ object is destroyed. Say we have the following program:

From

Cover of Learning C++ by Creating Games with UE4

Note

构造函数就是你的对象在创建时候首先执行的函数,析构函数就是你的对象在销毁时执行的