xcb: do not leak window system integration
Destroy the GLX or EGL backend. This also requires fixing an uninitalized member in the native interfaace handler. Besides fixing the leak this will also do eglTerminate on exit, which is very beneficial for proper resource cleanup and avoids "Display is destroyed with resources" warnings on Mesa with debugging enabled. Change-Id: Ibd62d6964e86ac1319abed1f06b478327c348a0e Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
This commit is contained in:
parent
c56da2e8da
commit
e8ef23eee4
@ -46,8 +46,9 @@
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QXcbNativeInterfaceHandler::QXcbNativeInterfaceHandler(QXcbNativeInterface *nativeInterface)
|
||||
: m_native_interface(nativeInterface)
|
||||
{
|
||||
nativeInterface->addHandler(this);
|
||||
m_native_interface->addHandler(this);
|
||||
}
|
||||
QXcbNativeInterfaceHandler::~QXcbNativeInterfaceHandler()
|
||||
{
|
||||
|
@ -406,6 +406,8 @@ QXcbConnection::~QXcbConnection()
|
||||
while (!m_screens.isEmpty())
|
||||
integration->destroyScreen(m_screens.takeLast());
|
||||
|
||||
delete m_glIntegration;
|
||||
|
||||
#ifdef XCB_USE_XLIB
|
||||
XCloseDisplay((Display *)m_xlib_display);
|
||||
#else
|
||||
|
Loading…
x
Reference in New Issue
Block a user