프로그래밍/C,C++

[wxWidgets] assert "assert GetEventHandler()== this" failed in ~wxWindowBase()

채윤아빠 2013. 7. 17. 17:24
728x90
반응형

Windows 7 / Mingw32 / wxWidget-2.9.4 / C::B

문제점 및 증상

  • wxWidgets의 wxAuiManager로 작성된 프로그램을 종료할 때, 다음과 같은 Debug Alert 창이 나타남 : assert "assert GetEventHandler()== this" failed in ~wxWindowBase()


해결 방안

  • Frame가 소멸될 때, AuiManager의 UnInit() 함수가 정상적으로 호출되지 못하여 발생
  • Frame 소멸자에서 wxAuiManager.UnInit() 함수 호출
    MyFrame::~MyFrame()
    {
        m_pAuiManager->UnInit();
    }
    


참고자료