zoukankan      html  css  js  c++  java
  • About "Serious Error: No RTTI Data"


    After I release the document from memeory, I forget to set NULL to the document pointer. Then later when trying to do dynamic_cast, above dialog pops up.
    But It's not proved true by below code:
    {
    CTestSub* pSub = new CTestSub();
     delete pSub;
     /*pSub = NULL;*/ // comment it.
     CTestParent* pParent = dynamic_cast<CTestParent*>(pSub);

    }
    After executing above code, no such dialog pops up. It's reasonable in this case because although the memory is released, but the memory area can still be treated a CTestSub object occupied it. Definitely, casting it to its parent class is correct.

    Note here, keeping on learning.
  • 相关阅读:
    数组迭代方法
    promise
    Gulp执行预处理
    第一个gulp 项目
    vue 单元素过渡
    webpack 入门
    webpack初始化
    v-for 指令
    ajax 工作原理
    面试小问题
  • 原文地址:https://www.cnblogs.com/taoxu0903/p/1017108.html
Copyright © 2011-2022 走看看