1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-01 01:32:04 +03:00

Eliminate a memory leak

This commit is contained in:
Tae Won Ha 2018-04-08 14:52:52 +02:00
parent 36eb5d12af
commit 4b5b7fe7c7
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44

View File

@ -134,6 +134,9 @@ static void socket_call_back(
}
- (void)disconnectAndStop {
// Otherwise we'll live forever. (MsgPackRpc is retained in dataCallbak)
self.dataCallback = nil;
if (_socket != NULL && CFSocketIsValid(_socket)) {
CFRunLoopStop(_run_loop);
CFSocketInvalidate(_socket);