为什么csimpleexception / cuserexception包含成员m_bautodelete和m_breadyfordelete,就像cexception一样?
我只是在测试和调试一些代码,而我在一个源自cuserexception
的例外类中挣扎。 cuserexception
再次从csimpleexception
和cexception
派生。
我知道cexception :: m_bautodelete
和cexception :: m_breadyfordelete
的用法。
现在,我可以看到两个变量m_bautodelete
和m_breadyfordelete
在csimpleexception
再次定义。但是它们从未被使用,也从未初始化。真的很奇怪...
有人知道该变量在基类中重新定义的原因吗?
I was just testing and debugging some code and I struggled over a an exception class that was derived from CUserException
. CUserException
is again derived from CSimpleException
and CException
.
I know about the usage of CException::m_bAutoDelete
and CException::m_bReadyForDelete
.
Now I can see that those both variables m_bAutoDelete
and m_bReadyForDelete
are defined in CSimpleException
again. But they are never used and never initialized. Real strange...
Does anybody know the reason that this variables are redefined in the base class?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为没有解决方案,也没有理由。
我将当前VS-2019 MFC代码与VC-6 MFC代码进行了比较。 AFX.H包含相同的未使用变量。
因此,我认为这是一个“错误”,因为“愚蠢的向后兼容性”从未解决的问题
I assume that there is no solution and not reason.
I compared the current VS-2019 MFC code with the VC-6 MFC Code. the afx.h contains the same unused variables.
So I assume it is a "bug" that what never fixed because of "silly backward compatibility"