correction for memory leak

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Gilles Depeyrot 2001-10-05 19:01:13 +00:00
parent 76bfdc7816
commit bf44306ebc
2 changed files with 10 additions and 2 deletions

View File

@ -301,7 +301,11 @@ IMPLEMENT_CLASS(wxGLApp, wxApp)
bool wxGLApp::InitGLVisual(int *attribList)
{
AGLPixelFormat fmt = ChoosePixelFormat(attribList);
return (fmt != NULL);
if (fmt != NULL) {
aglDestroyPixelFormat(fmt);
return true;
} else
return false;
}
wxGLApp::~wxGLApp(void)

View File

@ -301,7 +301,11 @@ IMPLEMENT_CLASS(wxGLApp, wxApp)
bool wxGLApp::InitGLVisual(int *attribList)
{
AGLPixelFormat fmt = ChoosePixelFormat(attribList);
return (fmt != NULL);
if (fmt != NULL) {
aglDestroyPixelFormat(fmt);
return true;
} else
return false;
}
wxGLApp::~wxGLApp(void)