Question

I am working and all was going well when I decided to implement a function that required me importing ReactiveCocoa. That went ok until I began getting warnings from Reactive Cocoa concerning Arc being on. However I dont think turning arc off in my case is an option since I started with it and turning it off may give me a host of other issues.

Is it "wise" or should I go thru the ReactiveCocas framework and commment out these release? OR what other way can i solve this.

ARC forbids explocot message send of 'release'
release is unavailable : not available in automatic reference counting mode

and

ARC forbids explocot message send of 'retain'
retainis unavailable : not available in automatic reference counting mode

Error Code

- (void)dealloc {
    dispatch_release(_queue);
}
- (id)initWithName:(NSString *)name queue:(dispatch_queue_t)queue {
    NSCParameterAssert(queue != NULL);

    self = [super initWithName:name];
    if (self == nil) return nil;

    dispatch_retain(queue);
    _queue = queue;

    return self;
}
Was it helpful?

Solution

Disable ARC for that file by Select the file and press ENTER, then you can add the -fno-objc-arc compiler flag.

You will get more information in below link :

How to disable ARC for a single file in Xcode 5?

http://www.learn-cocos2d.com/2011/11/everything-know-about-arc/

Hope this will resolve it , use both ARC and non ARC in single project.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top