VC中ExitIstance()这个函数不理解

2024年11月29日 23:39
有2个网友回答
网友(1):

The ExitInstance member function of class
CWinApp is called each time a copy of your
application terminates, usually as a result of the user quitting the
application.
Override ExitInstance if you need special cleanup processing, such as
freeing graphics device interface (GDI) resources or deallocating memory used
during program execution. Cleanup of standard items such as documents and views,
however, is provided by the framework, with other overridable functions for
doing special cleanup specific to those objects.
上面是MSDN上的解释,看不懂的地方查词典吧!

网友(2):


CWinApp的ExitInstance成员函数被称为
应用程序的副本时终止,通常
应用程序的用户退出的结果。
覆盖的ExitInstance,如果您需要特殊的净化处理,如
释放图形设备接口(GDI)资源或解除
程序执行过程中使用的内存。清理标准的项目,如文档和视图,
但是,所提供的框架与其他的重写功能
做了特殊的清理针对这些对象。
以上MSDN上的本地词典的解释不明白!