No need to call -stop from -dealloc
This commit is contained in:
@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user