Ios 调用方使用dispatch_release此时不拥有的对象的引用计数减少不正确

Ios 调用方使用dispatch_release此时不拥有的对象的引用计数减少不正确,ios,objective-c,reachability,Ios,Objective C,Reachability,我试图使用tonymillion可达性库,但是我在释放que中的项的部分代码中遇到错误 这就是错误看起来的错误,即调用方此时不拥有的对象的引用计数的错误递减 这就是我的代码的样子 //create a serial queue self.reachabilitySerialQueue = dispatch_queue_create("com.tonymillion.reachability", NULL); // set it as our reachabili

我试图使用tonymillion可达性库,但是我在释放que中的项的部分代码中遇到错误

这就是错误看起来的错误,即调用方此时不拥有的对象的引用计数的错误递减

这就是我的代码的样子

//create a serial queue
    self.reachabilitySerialQueue = dispatch_queue_create("com.tonymillion.reachability", NULL);        

    // set it as our reachability queue which will retain the queue
    if(SCNetworkReachabilitySetDispatchQueue(self.reachabilityRef, self.reachabilitySerialQueue))
    {
        dispatch_release(self.reachabilitySerialQueue); //error here
        // refcount should be ++ from the above function so this -- will mean its still 1
        return YES;
    }

    dispatch_release(self.reachabilitySerialQueue); // error here
    self.reachabilitySerialQueue = nil;
    return NO;
我不知道还有什么别的办法可以解决这个问题,希望有人能提供一些见解,因为我在参考计数方面的经验非常少


我们将通知您任何帮助。

ARC下不需要调度释放。我的可达性类副本将这些调用封装在一个if-def中。谢谢你去看看新的。