I'm using the iOS Sync API to load in image files and grab there contents and display them in a scroll view. As the user scrolls it loads and unloads images. But I see that once you open a file you cannot open it again. So I am getting errors when it tries to load again. I don't really need to keep the files open, but I cannot find a way to close them, or grab an already open file.
What is the best practice for this? Should I just keep a dictionary of files and there paths? I was trying this but running into memory issues.
- (DBFile )openFile:(DBPath *)path error:(DBError *)error; // I'm using this function and calling it in a block via: dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), block);