Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是我看到的一些 GLX 代码的示例:
display = XOpenDisplay(0); // ... xcb_connection_t *connection = XGetXCBConnection(display); // ... XCloseDisplay(display);
我注意到那里没有xcb_disconnect。它是否正确?还有,connection关闭显示后还有效吗?
xcb_disconnect
connection
XCloseDisplay似乎撤消了显示器的创建(因此破坏了它),并且由于 XCB 连接对象是从显示器派生的,因此一旦关闭显示器,连接就会失效似乎是合理的。
XCloseDisplay