Objective-C Library - cannot form weak reference to instance of class

前端 未结 3 651
借酒劲吻你
借酒劲吻你 2021-02-08 11:38

I\'m currently working with the XMPP Library for Objective-C, and I\'m using the \"Desktop\" example code.

It logs in fine; however, when I open a new chat, or someone s

3条回答
  •  我寻月下人不归
    2021-02-08 11:47

    remember that you need to comment two places.

    @interface GCDMulticastDelegateNode : NSObject
    {
    //#if __has_feature(objc_arc_weak)
    //__weak id delegate;
    //#else
    __unsafe_unretained id delegate;
    //#endif
    
    dispatch_queue_t delegateQueue;
     }
    
     - (id)initWithDelegate:(id)delegate delegateQueue:(dispatch_queue_t)delegateQueue;
    
     //#if __has_feature(objc_arc_weak)
     //@property (/* atomic */ readwrite, weak) id delegate;
     //#else
     @property (/* atomic */ readwrite, unsafe_unretained) id delegate;
     //#endif
    
     @property (nonatomic, readonly) dispatch_queue_t delegateQueue;
    
     @end
    

提交回复
热议问题