Fix deallocating an X11Display

This commit is contained in:
Sergey Bugaev 2018-09-18 22:36:01 +03:00
parent 4287f05174
commit 29c1349bc6

View File

@ -112,13 +112,12 @@ static void socketCallback(
}
-(void)dealloc {
if(_display)
if(_display) XCloseDisplay(_display);
#ifdef DARLING
CFRelease(_source);
CFRelease(_cfSocket);
if (_source != NULL) CFRelease(_source);
if (_cfSocket != NULL) CFRelease(_cfSocket);
#endif
XCloseDisplay(_display);
[_windowsByID release];
[super dealloc];
}