Dear Dropbox Developers,
I found a memory leak issue with the last Dropbox SDK on iOS with Xcode 6.4 running on iPhone4S. So far I confirmed that the memory leak occurs when files are uploaded.
To reproduce the issue, just use the sample project "DSRoulette". Create a button on the UI and link it to the following method.
- (IBAction)onClickButton:(id)sender {
NSString *text = @Hello world.;
NSString *filename = @working-draft.txt;
NSString *localDir = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0];
NSString *localPath = [localDir stringByAppendingPathComponent:filename];
[text writeToFile:localPath atomically:YES encoding:NSUTF8StringEncoding error:nil];
// Upload file to Dropbox
NSString *destDir = @/log;
[self.restClient uploadFile:filename toPath:destDir withParentRev:nil fromPath:localPath];
}
Launch the app and then monitor the memory usage on Xcode. Keep pressing the button for 20 times. You will see the memory usage does not increase for the first 10+ files upload. But then jump higher ~0.3 MB after ~15 files upload. If you continue pressing the button, the memory usage will continue to increase.