In my application I am dealing with uploading of images. My images are in documents directory.
I am using NSFileManager
to get the data from it and converting to base 64 encoding.
Everything goes good while uploading. But after successful uploading of images it shows 100MB allocations out of which around 54MB are shown for CFString
. Can anybody guide me for the reason of CFString
allocation?
Code snippet:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSFileManager *fileMngr=[NSFileManager defaultManager];
NSString *strZipPath= [[paths objectAtIndex:0] stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.zip",strRandomFolderName]];
NSData *dat=[[NSData alloc] initWithContentsOfFile:strZipPath];
NSString *strZipEncoded =[dat encodeBase64ForData];
strZipEncoded is sent to server using webmethod.
Please find images for more information.
Thanks.