I am trying to free up memory in objective-C. Also I am new to it.
Please find below the sample code. What do I have to do to free up in this code:
CGImageRef cgiRef = [uiiInputImage CGImage];
CGImageRef cgiNewRef = CGImageCreateWithImageInRect(cgiRef, cgrRegionInfo);
uiiTargetTemp = [UIImage imageWithCGImage:cgiNewRef];
UIImage *uiiOutputImage = uiiTargetTemp;
uiiTargetTemp = nil;
Also where can I find documentation regarding the flow of allocating, assigning and releasing objects in Objective-C
To precisely answer your question:
Judging from this snippet, you would be well served by reading the beginner resources provided by Apple. In addition to the resources @Swapna provided, I would recommend The Objective-C Programming Language: Introduction and Memory Management Programming Guide: Introduction. A good book or two also can’t hurt. 😉