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:
@@ -301,7 +301,11 @@ IMPLEMENT_CLASS(wxGLApp, wxApp)
|
|||||||
bool wxGLApp::InitGLVisual(int *attribList)
|
bool wxGLApp::InitGLVisual(int *attribList)
|
||||||
{
|
{
|
||||||
AGLPixelFormat fmt = ChoosePixelFormat(attribList);
|
AGLPixelFormat fmt = ChoosePixelFormat(attribList);
|
||||||
return (fmt != NULL);
|
if (fmt != NULL) {
|
||||||
|
aglDestroyPixelFormat(fmt);
|
||||||
|
return true;
|
||||||
|
} else
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxGLApp::~wxGLApp(void)
|
wxGLApp::~wxGLApp(void)
|
||||||
|
@@ -301,7 +301,11 @@ IMPLEMENT_CLASS(wxGLApp, wxApp)
|
|||||||
bool wxGLApp::InitGLVisual(int *attribList)
|
bool wxGLApp::InitGLVisual(int *attribList)
|
||||||
{
|
{
|
||||||
AGLPixelFormat fmt = ChoosePixelFormat(attribList);
|
AGLPixelFormat fmt = ChoosePixelFormat(attribList);
|
||||||
return (fmt != NULL);
|
if (fmt != NULL) {
|
||||||
|
aglDestroyPixelFormat(fmt);
|
||||||
|
return true;
|
||||||
|
} else
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxGLApp::~wxGLApp(void)
|
wxGLApp::~wxGLApp(void)
|
||||||
|
Reference in New Issue
Block a user