Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我在 Windows 上关闭我的应用程序时。有时它会扔进MciPlayer.cpp类Access violation writing location的析构函数中
Access violation writing location
MciPlayer::~MciPlayer() { Close(); DestroyWindow(m_hWnd); }
该应用程序有时会在DestroyWindow(m_hWnd);. 我不知道为什么会这样?
DestroyWindow(m_hWnd);
我在Windows 7 x86上使用cocos2d-2.0-x-2.0.4
在文件“CCEGLView.cpp”中,“DestroyWindow(m_hWnd)”将在函数 CCEGLView::end() 中调用。因此,请确保您没有将其销毁两次。
if(m_hWnd) { DestroyWindow(m_hWnd); m_hWnd = NULL; }