【发布时间】:2018-05-02 07:48:58
【问题描述】:
class LTexture
{
public:
LTexture();
~LTexture(); // what does it do exactly?
};
【问题讨论】:
-
请查看此C++ books 列表。
-
这是析构函数。查找您的教科书它的目的是什么。
class LTexture
{
public:
LTexture();
~LTexture(); // what does it do exactly?
};
【问题讨论】:
~constructorName() 是类的destructor,当对象超出范围或调用delete 时会调用它。析构函数用于清理代码,例如释放内存和关闭文件。
【讨论】: