I've never worked with non-ARC before, and I tried ZXingObjC sample project (QR Code Scanner), it's non-ARC project as well as the library. I started with deleting the autorealese, dealloc etc. But I've encounter 'retain' and I don't know yet how to handle it. I'll glad for a hand as it will benefit a lot of us.
Example of 'retain' statements:
if (zxd) {
input =
[ZXCaptureDeviceInput deviceInputWithDevice:zxd
ZXAV(error:nil)];
[input retain];
}
Another One:
- (void)setCaptureDevice:(ZXCaptureDevice *)device {
if (device == capture_device) {
return;
}
if(capture_device) {
ZXQT({
if ([capture_device isOpen]) {
[capture_device close];
}});
[capture_device release];
}
capture_device = [device retain];
}
EDIT: OK, I've been trying to make "EDIT --> Refactor --> Convert to Objective-C ARC", I get:
OK, what I did is:
Project now fully work with ARC. I'll upload later to github.