No need to call -stop from -dealloc

This commit is contained in:
Pierre-Olivier Latour
2014-04-30 13:36:06 -07:00
parent 56c096996f
commit 94ad8c745e

View File

@ -199,11 +199,7 @@ static void _ConnectedTimerCallBack(CFRunLoopTimerRef timer, void* info) {
- (void)dealloc { - (void)dealloc {
DCHECK(_connected == NO); DCHECK(_connected == NO);
DCHECK(_activeConnections == 0); DCHECK(_activeConnections == 0);
DCHECK(_options == nil); // The server can never be dealloc'ed while running because of the retain-cycle with the dispatch source
_delegate = nil;
if (_options) {
[self stop];
}
CFRunLoopTimerInvalidate(_connectedTimer); CFRunLoopTimerInvalidate(_connectedTimer);
CFRelease(_connectedTimer); CFRelease(_connectedTimer);