I want to capture the memory allocation by content type (example: music, video, etc). How can this be done on iPhone?
Asked
Active
Viewed 154 times
0
-
can u be clear about which type of memory allocation – Feb 17 '12 at 10:28
-
@krishna: Thanks, Memory allocated for music files, video files etc.. – pushpa Feb 17 '12 at 10:43
-
1http://stackoverflow.com/questions/6044147/memory-limit-and-ios-memory-allocation-in-iphone-sdk is this usefull – Feb 17 '12 at 10:50
-
I want to fetch the total size of the music files available in the iphone – pushpa Feb 17 '12 at 11:43
1 Answers
1
If you get the file path then you can get the size of that:
int fileSize = [[[NSFileManager defaultManager] attributesOfItemAtPath:someFilePath error:nil] fileSize];

David Pfeffer
- 38,869
- 30
- 127
- 202
-
Thanks krishna, But i am not getting the file path only, Where exactly the music files get stored in ios5 – pushpa Feb 17 '12 at 12:18
-
1
-
https://bitbucket.org/artgillespie/tslibraryimport this will help to get the path – Feb 17 '12 at 13:10