TObject::FreeInstance - C++ Builder

C++ Builder 参考手册 ➙ System ➙ TObject ➙ FreeInstance


头文件:#include
命名空间:System
函数原型:

virtual void __fastcall FreeInstance(void);

System::TObject::FreeInstance 是 System::TObject 的成员函数,释放 NewInstance 分配的内存。

  • 析构函数会自动调用 FreeInstance,不要直接调用 FreeInstance;
  • 如果重载了 NewInstance 就必须重载 FreeInstance 与之对应;
  • 和 NewInstance 一样,FreeInstance 也是通过 InstanceSize 获取释放内存的字节数。

参考:

  • System::TObject::CleanupInstance
  • System::TObject::NewInstance
  • System::TObject::InitInstance
  • System::TObject::InstanceSize
  • System::TObject
  • VCL 类继承关系

C++ Builder 参考手册 ➙ System ➙ TObject ➙ FreeInstance

你可能感兴趣的:(TObject::FreeInstance - C++ Builder)