Example:
NSData *fileData = [fileHandle readDataToEndOfFile];
Am I responsible for closing that file handle? (I think I’m not…but just 99.95% sure!)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You are not required to close the file handle, however, it is good practice to deallocate the NSFileHandle object when you are finished with it. This will ensure that the memory used by the application is kept to a minimum.
iOS Class Reference: