开发者

getting error in "delete CDocManager::pStaticDocManager;"

开发者 https://www.devze.com 2023-02-04 11:16 出处:网络
While running following code if (CDocManager::pStaticDocManager != NULL) { delete CDocManager::pStaticDocManager;

While running following code

if (CDocManager::pStaticDocManager != NULL)
  {
   delete CDocManager::pStaticDocManager;
   CDocManager::pStaticDocManager = NULL;
  }

exception "Unhandled exception at开发者_如何学Python 0x0041f09d in ChinaEncrypter.exe: 0xC0000005: Access violation reading location 0x00003130" is coming in delete statement.

*Note:*This error is coming only in release mode and pStaticDocManager is initialising only in release mode. In debug mode it is having NULL value during whole process.

Thanks in advance.


Did you explicit initialize pStaticDocManager to NULL ?

Also make sure the instance pointed by pStaticDocManager have all its member correctly initialized.

0

精彩评论

暂无评论...
验证码 换一张
取 消