Discard reply in ~Wraper if not yet retrieved
Ensures that we don't leak replies.
This commit is contained in:
parent
b3885dcb99
commit
1e47911ab0
1 changed files with 5 additions and 0 deletions
|
@ -46,6 +46,11 @@ public:
|
|||
, m_window(window)
|
||||
{
|
||||
}
|
||||
virtual ~Wrapper() {
|
||||
if (!m_retrieved) {
|
||||
xcb_discard_reply(connection(), m_cookie.sequence);
|
||||
}
|
||||
}
|
||||
|
||||
inline const Reply *operator->() {
|
||||
getReply();
|
||||
|
|
Loading…
Reference in a new issue