GLX: fix memory leak
This commit is contained in:
parent
b0f61201c3
commit
f3f2ed1536
|
@ -92,7 +92,7 @@ bool cInterfaceGLX::Create(void *window_handle)
|
||||||
XFree(fbc);
|
XFree(fbc);
|
||||||
|
|
||||||
// Get an appropriate visual
|
// Get an appropriate visual
|
||||||
vi = glXGetVisualFromFBConfig(dpy, fbconfig);
|
XVisualInfo* vi = glXGetVisualFromFBConfig(dpy, fbconfig);
|
||||||
|
|
||||||
// Create a GLX context.
|
// Create a GLX context.
|
||||||
// We try to get a 3.3 core profile, else we try it with anything we get.
|
// We try to get a 3.3 core profile, else we try it with anything we get.
|
||||||
|
@ -142,6 +142,8 @@ bool cInterfaceGLX::Create(void *window_handle)
|
||||||
s_backbuffer_height = attribs.height;
|
s_backbuffer_height = attribs.height;
|
||||||
|
|
||||||
win = XWindow.CreateXWindow(parent, vi);
|
win = XWindow.CreateXWindow(parent, vi);
|
||||||
|
XFree(vi);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@ private:
|
||||||
Display *dpy;
|
Display *dpy;
|
||||||
Window win;
|
Window win;
|
||||||
GLXContext ctx;
|
GLXContext ctx;
|
||||||
XVisualInfo *vi;
|
|
||||||
GLXFBConfig fbconfig;
|
GLXFBConfig fbconfig;
|
||||||
public:
|
public:
|
||||||
friend class cX11Window;
|
friend class cX11Window;
|
||||||
|
|
Loading…
Reference in New Issue